Commit Graph

9381 Commits

Author SHA1 Message Date
Pxl
45232d65a6 [Chore](case) remove load big lateral view from p1 to p2 (#17851)
move load big lateral view from p1 to p2, this case takes a long time to execute
2023-03-20 13:10:12 +08:00
223d7a36eb adjust distribution stats derive, fix bug in join estimation (#17916) 2023-03-20 13:04:29 +08:00
93cfd5cd2b [Enhance](ComputeNode)support k8s watch (#17442)
Describe your changes.

1.Add the watch mechanism to listen for changes in k8s statefulSet and update nodes in time.
2.For broker, there is only one name by default when using deployManager
3.Refactoring code makes it easier to understand and maintain
4.Fix jar package conflicts between okhttp-ws and okhttp

Previously, the logic of k8sDeployManager.getGroupHostInfos was to call the endpoints () interface of k8s,
which would cause if the pod was unexpectedly restarted, k8sDeployManager would delete the pod before the
restart from the fe or be list and add the pod after the restart to the fe or be list, which obviously does not
meet our expectations.
Now, after fqdn is enabled, we call the statefulSets() interface of k8s to listen for the number of copies to
determine whether we need to be online or offline.
In addition, the watch mechanism is added to avoid the possible A-B-A problem caused by timed polling.
For the sake of stability, when the watch mechanism does not receive messages for a period of time,
it will be degraded to the polling mode.

Now several environment variables have been added,ENV_FE_STATEFULSET,ENV_FE_OBSERVER_STATEFULSET,ENV_BE_STATEFULSET,ENV_BROKER_STATEFULSET,ENV_CN_STATEFULSET For statefulsetName,One-to-one correspondence with ENV_FE_SERVICE,ENV_FE_OBSERVER_SERVICE,ENV_BE_SERVICE,ENV_BROKER_SERVICE,ENV_CN_SERVICE,If a serviceName is configured, the corresponding statefulsetName must be configured, otherwise the program cannot be started.
2023-03-20 11:36:32 +08:00
06095054ab [doc](readme)correct some links (#17938) 2023-03-20 09:58:03 +08:00
ff09daaae3 [fix](test) add order by to test_alter_table_column (#17936) 2023-03-20 09:07:43 +08:00
378789ba8a [Fix](parquet-reader) Fix dict_filter crashed caused by VDirectInPredicate checking expr result is not nullable. (#17924)
Be crashed in parquet dict_filter function caused by VDirectInPredicate checking expr result is not nullable.
2023-03-20 00:02:59 +08:00
5c990fb737 [fix](nereids) Analyze failed for SQL that has count distinct with same col (#17928)
This problem is caused by the slots with same hashcodes was put in the hashset results into the wrong rules was selected.Use list instead of set as return type of getDistinctArguments method
2023-03-19 21:31:47 +08:00
74dfdc00dc [nerids](statistics) remove lock in statistics cache loader #17833
remove the redandunt lock in the CacheLoader, since it use the forkjoinpool in default
Add execute time log for collect stats
Avoid submit duplicate task, when there already has a task to load for the same column
2023-03-19 20:30:21 +08:00
bf814411d8 [fix](tests) add order by for test_multiply and test_schema_change_with_delete (#17929) 2023-03-19 17:57:29 +08:00
1d26b4d6c2 [improvement](predicate) Cache the dict code in ComparisonPredicate (#17684) 2023-03-19 17:37:28 +08:00
5bd00626be [doc](releasenote) 1.2.3 release note (#17926) 2023-03-19 15:01:29 +08:00
295b26db00 [chore](fe) update aspectj-maven-plugin to 1.14.0 version (#17890)
In #17797 , we introduced aspectj to help log exception easily.
However, the plugin version 1.11 do not support jdk9 and later.
For support compile FE with jdk11

update aspectj-maven-plugin to 1.14.0 version
add new dependency org.aspectj.aspectjrt 1.9.7 to fe-core
according to:

aspectj java version compatibility
aspectj-maven-plugin issue
aspectj release note
intro to aspectj
2023-03-19 14:50:09 +08:00
dd53bc1c8d [unify type system](remove unused type desc) remove some code (#17921)
There are many type definitions in BE. Should unify the type system and simplify the development.



---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-19 14:05:02 +08:00
a993ac91d4 [bugfix](jsonb memory leak) there are memory leak in jsonb field (#17922)
* [bugfix](jsonb memory leak) there are memory leak in jsonb field


---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-19 14:04:14 +08:00
e359e412e1 [vectorized](udaf) fix java udaf meet error of std::bad_alloc (#17848)
Now if the user code of java udaf throws exception, because c++ code of agg function nobody could deal
with it, so maybe get error of std::bad_alloc
2023-03-19 11:52:15 +08:00
dfa2528b5e [fix](bitmap) fix wrong result of bitmap count functions for null values (#17849)
bitmap count functions result is null when there are null values, which is not right:
2023-03-19 11:49:58 +08:00
14dcdd188e [fix](fe) fix MetricRepo.THRIFT_COUNTER_RPC_ALL NullPointException (#17552) 2023-03-19 11:39:19 +08:00
b111f9a518 [fix](insert) Session varaiables dont work for transaction insert (#17551) 2023-03-19 10:43:02 +08:00
e7e13bc338 [optimize](array function) array_apply fucntion vectorized compute column_filter loop (#17687) 2023-03-19 10:18:09 +08:00
5f2b68df24 [fix](regression-test) fix unstable regression test cases found in p0 (#17900) 2023-03-19 10:11:57 +08:00
0de7f9787b [doc](typo) Fix a few character errors (#17911) 2023-03-19 09:09:02 +08:00
c5c89f3016 [Improve](hana catalog)Currently logged in users should only see the schemas they can access (#17918)
In the case of hana catalog, I think the current logged-in users should only see the schemas they can access.
2023-03-18 22:21:01 +08:00
d79da2f926 [Fix](parquet-reader) Fix dict filter not enabled. (#17882) 2023-03-18 22:16:37 +08:00
c95eb8a67f [enhancement] Function(create/drop) support the global operation (#16973) (#17608)
Support create/drop global function. 
     When you create a custom function, it can only be used within in one database. It cannot be used in other database/catalog. When there are many databases/catalog, it needs to create function one by one.

## Problem summary

Describe your changes.
1、 When a function is created or deleted, add the global keyword.

CREATE [GLOBAL] [AGGREGATE] [ALIAS] FUNCTION function_name (arg_type [, ...]) [RETURNS ret_type] [INTERMEDIATE inter_type] [WITH PARAMETER(param [,...]) AS origin_function] [PROPERTIES ("key" = "value" [, ...]) ]

DROP [GLOBAL] FUNCTION function_name (arg_type [, ...])

2、A completely global global function is set, and the global function metadata is stored in the image. The function lookup strategy is to look in the database first, and if it can't be found, it looks in the global function.
Co-authored-by: lexluo <lexluo@tencent.com>
2023-03-18 22:06:48 +08:00
49a053b3da [typo](docs) Add a hyperlink to facilitate user redirect. (#17899) 2023-03-18 21:21:36 +08:00
ee0f6120db [typo](doc)Replace invalid urls (#17886)
Co-authored-by: hechao <hechao@selectdb.com>
2023-03-18 21:20:52 +08:00
88713037bf [Bug][Fix] pipeline exec engine get wrong result when run regression test (#17896)
Fix regression p1:regression-test/suites/datev2/tpcds_sf1_p1/sql/pipeline case
2023-03-18 20:41:10 +08:00
e4d9ecd389 [regression-test](array) Fix array case, add order by (#17906) 2023-03-17 21:24:41 +08:00
3593b82498 [fix](schema change) Fix fe restart failed because of replay schema change alter job failed (#17825) 2023-03-17 20:54:50 +08:00
5c5dcfda78 Revert "[enhancement](memory) PODArray replaces MemPool in PredicateColumn (#17800)" (#17910)
This reverts commit 17d1c1bc7f6cc95eecd224eaa219c976b60fa17e.
2023-03-17 20:50:01 +08:00
46d88ede02 [Refactor](Metadata tvf) Reconstruct Metadata table-value function into a more general framework. (#17590) 2023-03-17 19:54:50 +08:00
8debc96d74 [enhancement](nereids) update FilterEstimation and Agg in stats derive (#17790)
* 1. update ndv in Stats,
2. skip __DORIS_DELETE_SIGN__=0 in stats derive,
3. equalTo in stats derive
4. update agg stats derive, support the case: all column_stats are unknown

* computeSize

* fix ut
2023-03-17 18:01:50 +08:00
043f77200f [Bug](dynamic-table) Fix column alignment logic and support filtering null values when slot is not null (#17842)
Before this PR when encountering null values with some columns which is specified as `NOT NULL`, null values will not be filtered,thi behavior does not match with the original load behavior.
Second column alignment logic has bug :

```
template <typename ColumnInserterFn>
void align_variant_by_name_and_type(ColumnObject& dst, const ColumnObject& src, size_t row_cnt,
                                    ColumnInserterFn inserter) {
    CHECK(dst.is_finalized() && src.is_finalized());
    // Use rows() here instead of size(), since size() will check_consistency
    // but we could not check_consistency since num_rows will be upgraded even
    // if src and dst is empty, we just increase the num_rows of dst and fill
    // num_rows of default values when meet new data
    size_t num_rows = dst.rows();
```
2023-03-17 16:53:30 +08:00
5bd5402378 [bug](udf) add synchronized to test resolve error of zip file closed (#17812) 2023-03-17 14:35:26 +08:00
1080a413a2 [fix](metric) Fix bug for that register txn replica failed (#17855) 2023-03-17 11:42:40 +08:00
bd44cc3f73 [fix](regression-test) move some case in test_query_sys_tables to p2 #17859 2023-03-17 11:26:06 +08:00
b95cd7eca2 [Refactor](function) Reconstruct default logic for const args. (#17830) 2023-03-17 11:13:13 +08:00
5d3de05976 [feature](map) basic functions for map datatype (#16916)
basic functions for map datatype:
- MAP<K, V> map(K k1, V v1, ...)
- BIGINT map_size(MAP<K, V> m)
- BOOL map_contains_key(MAP<K, V> m, K k1)
- BOOL map_contains_value(MAP<K, V> m, V v1)
- ARRAY< K> map_keys(MAP<K, V> m)
- ARRAY< V> map_values(MAP<K, V> m)
2023-03-17 10:28:17 +08:00
f099b7d7b5 [Doc](typo) Remove redundant symbols and Fix some misspelled words (#17609) 2023-03-17 09:01:59 +08:00
1222403233 [doc](typo)Fix docs insert into manual #17856 2023-03-17 08:57:02 +08:00
Hao
cf56a76108 [doc](typo)fix the different between cn and en document #17875 2023-03-17 08:52:51 +08:00
0ec10d4836 [Enhancement](fe exception) write a java annotation to catch throwable from a method and print log (#17797)
How it works?
Aspectj is used to implement the aspect function of annotations. During the compilation process, the aspectj-maven-plugin plugin will automatically weave the code with aspect annotations into the generated classes file.
When to use to?
When a method wants to add a try catch to save exception information, the LogException annotation can be used. When there is a method that does not allow errors, the NoException annotation can be used.
What is the result when adding this annotation?
Use the LogException annotation to automatically capture exceptions into the Log file, and the code can be more concise. Use the NoException annotation to automatically capture the exception to the Log file and exit the program when an exception occurs.
2023-03-17 08:52:27 +08:00
b4b126b817 [Feature](parquet-reader) Implements dict filter functionality parquet reader. (#17594)
Implements dict filter functionality parquet reader to improve performance.
2023-03-16 20:29:27 +08:00
24dbdb6a2f Update es.md (#17816) 2023-03-16 20:14:47 +08:00
e98143d44a [chore](thrift proto) add mysql_row_binary_format to PaloInternalService.thrift (#17844) 2023-03-16 18:48:56 +08:00
9173096b2d [fix](ui) fix download txt format error (#17789)
fix download txt format error
2023-03-16 17:59:29 +08:00
b5867176d4 [enhance](cooldown) add new cooldown cases (#16888) 2023-03-16 17:34:32 +08:00
b17c421f52 [fix](datetime) will get String index out of range exception (#17735)
will get String index out of range exception when use error datetime values like '2020-02-01'
before:
MySQL [test]> select test121.k1 from test121 where k1 != ('9102-12-');
ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: String index out of range: 8

after:
MySQL [test]> select test121.k1 from test121 where k1 = '9102-12-';
ERROR 1105 (HY000): errCode = 2, detailMessage = Incorrect datetime value: '9102-12-' in expression: k1 = '9102-12-'
Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-16 16:13:47 +08:00
5dde910931 [feature](profile) add clean all profile sql (#17751)
Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-16 16:12:21 +08:00
cbfbe67508 [enhancement](fe query schedule) use try write lock to avoid too much wait time for planner (#17822)
* [enhancement](fe query schedule) use try write lock to avoid too much wait time for planner; prin acii id instead of big int
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-16 16:01:33 +08:00