Commit Graph

7364 Commits

Author SHA1 Message Date
cf2de85633 [Document](function) add docs of hll_cardinality/hll_empty/hll_hash (#14547) 2022-11-27 13:40:16 +08:00
93b940bc92 [test](jdbc)add new case for mysql jdbc table (#14581) 2022-11-27 13:39:59 +08:00
78adecac1b [enhancemennt](be)optimize mem usage in join and set node (#14602) 2022-11-27 13:38:49 +08:00
38b4cbe253 [Bug](regression) regression fail random in fuzzy mode (#14614) 2022-11-27 09:23:36 +08:00
b3859e1e1a [ehancement](fe) Remove unnecessary kill in AutoCloseConnectContext (#14606)
The invocation in ConnectContext.kill in AutoCloseConnectContext is redundant and caused too many useless logs
2022-11-26 23:54:33 +08:00
36419fae48 [fix](JdbcExecutor) fix that JdbcExecutor did not load the class jar (#14598)
JdbcExecutor did not load jdbc driver jar, so add classloader to load jdbc jar.
2022-11-26 23:53:05 +08:00
a877c8e50d [test](docker) delete show table (#14612) 2022-11-26 23:44:29 +08:00
6b8f1a1a88 [typo](docs) fix four string functions' document issue #14610
Co-authored-by: yuleiyang <yuleiyang@tencent.com>
2022-11-26 19:27:40 +08:00
dd21056a4c [fix](nereids) delete view in regression-test (#14607) 2022-11-26 18:03:21 +08:00
d5d3f7e0b7 [fix](memtracker) Fix thrift BackendService thread local is not initialized, memtracker init fail (#14589) 2022-11-26 13:04:39 +08:00
4c60186e87 [test](jdbc)add new case for pg jdbc table (#14582) 2022-11-26 13:02:05 +08:00
7486660c12 [feature](Docs) add backends and rowsets docs (#14542)
* add backends and rowsets docs

* fix doc
2022-11-26 12:24:50 +08:00
70a424d6e3 [Bug](regression) Fail regression test in test_grouping_sets in fuzzy mode (#14601) 2022-11-26 12:17:31 +08:00
81fece5360 [improvement](cache) close compaction&schema_change&checksum index meta cache (#14586) 2022-11-26 12:15:32 +08:00
5626c4b042 [chore](asf) Make workflows required (#14591)
Make the following workflows required.
1. BE UT (macOS)
2. Build Third Party Libraries (Linux)
3. Build Third Party Libraries (macOS)
2022-11-26 11:48:05 +08:00
064b8d2aa6 [fix](multi-catalog) fix coredump when querying partitioned hive table with text format (#14604)
BE will crash when querying partitioned hive table with text format
and put partition column at first of select items.

1. FE should use file slots to set the column mapping index of csv file.
2. BE should use `get_by_name` of block to get right column in a block in csv reader.
2022-11-26 11:42:40 +08:00
52c6ba051e [feature](jsonb type)refactor JSONB type using column and add testcase (#13778)
1. Refactor JSONB type using ColumnString instead making a copy.
2. Add regression testcase for JSONB load and functions.
2022-11-26 10:06:15 +08:00
2ae7dae925 [feature](nereids) Support row policy (#13879)
This pr did two things:
1. 【new logical plan】add **LogicalCheckPolicy** before UnboundRelation in LogicalPlanBuilder.
2. 【new rule】turn **LogicalCheckPolicy** to LogicalFilter if row policy exist, otherwise remove it.
2022-11-25 22:57:56 +08:00
d159a8d24b [test](pipline) modify teamcity regression pipline fe conf to 4G (#14584)
* adjust mem limit to 30%

* [test](pipline) modify teamcity regression pipline fe conf to 4G
2022-11-25 22:32:51 +08:00
b9fffe1633 [typo](docs)Modify the array function doc (#14592) 2022-11-25 22:31:05 +08:00
ef82139a37 [pipeline](conf) set fragment_pool_thread_num_max=5000 in be.coonf (#14597) 2022-11-25 22:30:04 +08:00
7ae7830c50 [improvement](function)add size function alias array_size (#14594)
* add size function alias

* fix
2022-11-25 22:29:48 +08:00
494f35c26b [fuzzy](test) disable some fuzzy variables since it has bugs (#14583)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2022-11-25 21:15:10 +08:00
45fa2fc56b [fix](multi catalog)Use -1 as external es table column id instead of uniq id (#14557)
Using cache to store external table columns, doesn't persist uniq id for external columns anymore.
So use -1 as column id for ES external table.
Avoid non-master FE trying to get uniq id problem. The problem will cause non-master FE fail to write bdbje.
2022-11-25 16:13:16 +08:00
9630257704 [fix](Nereids): fix bugs in random construct join plan (#14575) 2022-11-25 16:05:29 +08:00
4728e75079 [feature](bitmap) Support in bitmap syntax and bitmap runtime filter (#14340)
1.Support in bitmap syntax, like 'where k1 in (select bitmap_column from tbl)';
2.Support bitmap runtime filter. Generate a bitmap filter using the right table bitmap and push it down to the left table storage layer for filtering.
2022-11-25 15:22:44 +08:00
d5777bb1e9 [enhancement](outfile) add retry for broker pwrite #14556
Problem:
We got following error frequently while SELECT xxx INTO OUTFILE:
ERROR 1064 (HY000): RpcException, msg: Fail to write to broker, broker:TNetworkAddress(hostname=a.b.c.d, port=8111) failed:write() send(): Broken pipe

Reason:

we cache broker thrift client in BE;
thrift client check connect isOpen only return cached flag, not care the real socket is opened or closed;
after we get client from cache, the socket may already closed, then pwrite will failed.
How to fix:
Other interfaces such as open and close, will reopen and retry again, but pwrite do not retry.
As there are write offset inside pwrite, and the broker(server) side also will check the write offset, it is safe to retry pwrite.
2022-11-25 14:20:33 +08:00
7ba4cd764a [enhancement](array-function) array_position,array_contains,countequal which in FunctionArrayIndex handle target NULL (#14564)
in the previous, the result is:
```
mysql> select array_position([1, null], null);
+--------------------------------------+
| array_position(ARRAY(1, NULL), NULL) |
+--------------------------------------+
|                                 NULL |
+--------------------------------------+
1 row in set (0.02 sec)
```

but after this commit, the result become:
```
mysql> select array_position([1, null], null);
+--------------------------------------+
| array_position(ARRAY(1, NULL), NULL) |
+--------------------------------------+
|                                    2 |
+--------------------------------------+
1 row in set (0.02 sec)
```
2022-11-25 14:19:50 +08:00
5efdcb9ed0 [improvement](storage) For debugging problem: add session variable (#14576) 2022-11-25 14:16:00 +08:00
d5d356b17f [vectorized](function) support order by field function (#14528)
* [vectorized](function) support order by field function

* update

* update test
2022-11-25 14:00:46 +08:00
25de068a05 [fix](parquet-reader) the value of null map will overflow when LazyRead merges too many empty batches (#14558)
The run length of null map is saved as `uint16_t`. Previously, the run length of null map was
limited by `batch_size` in the `ParquetReader`, by setting `batch_size = std::min(batch_size, (size_t)USHRT_MAX)`.
It works well when the batch size is less than `USHRT_MAX`.
However, [Lazy read](https://github.com/apache/doris/pull/13917) will merge empty batches until reading
a non-empty batch or reaching the EOF of a row group, so the `batch_size` may be greater than `USHRT_MAX`
in non-predicate columns.
In addition, even if the `batch_size` does not exceed `USHRT_MAX`, the adjacent batches may also make
the run  length exceed the `USHRT_MAX` in `ColumnSelectVector::get_next_run`.
2022-11-25 12:22:18 +08:00
f68fa442cd [Bug](regression-test) Fix regression aggregate failed muti distinct (#14563)
Fix regression aggregate failed muti distinct
2022-11-25 10:58:10 +08:00
deef491e01 [fix](Nereids) refactor CTE and EliminateAliasNode and fix the bug that CTE reuse relationId (#14534)
This pr contribute:
- support explain CTE;
- refine CTE, fix the bug: reuse the same analyzed plan which LogicalOlapScan has the same relationId;
- change EliminateAliasNode to LogicalSubQueryAliasToLogicalProject and move to the top of rewrite stage, so we can simply observe the analyzed plan by the LogicalSubQueryAlias with alias;
- job traverse left child first, so the ExprId growth from left child to right child.
2022-11-25 10:54:53 +08:00
225e4981ed [feature](selectdb-cloud) Fix leak in VCollectorIterator (#962) (#14549)
`VCollectIterator::build_heap()` leaks memory when there is a `VCollectIterator::LevelIterator::init()` fails.
2022-11-25 10:25:24 +08:00
5ccc875824 [fix](recycle) refactor the logic of erase meta with same name (#14551)
in #14482, we implement the feature to keep specific number of meta with same name in catalog recycle bin.
But it will cause meta replay bug.
Because every time we drop db/table/partition, it will try to erase a certain number of meta with same name.
And when replay "drop" edit log, it will do same thing. But the number of meta to erase it based on current config value,
not persist in edit log, so it will cause inconsistency with "drop" and "replay drop".

In this PR, I move the "erase meta with same name" logic to the daemon thread of catalog recycle bin.
2022-11-25 09:47:24 +08:00
d12112b930 [fix](fe) Fix mem leaks (#14570)
1. Fix memory leaks in StmtExecutor::executeInternalQuery
2. Limit the number of concurrent running load task for statistics cache
2022-11-25 09:16:54 +08:00
0ae246a93b [chore](github) Optimize BE UT workflows (#14565)
In #14533 , we run BE UT workflows periodically to share the cache with brand new pull requests. However, we don't need to save the cache when the unit tests doesn't run, otherwise it may occupy huge cache space and some useful caches will be evicted by GitHub.
2022-11-25 07:52:03 +08:00
9103ded1dd [improvement](join)optimize sharing hash table for broadcast join (#14371)
This PR is to make sharing hash table for broadcast more robust:

Add a session variable to enable/disable this function.
Do not block the hash join node's close function.
Use shared pointer to share hash table and runtime filter in broadcast join nodes.
The Hash join node that doesn't need to build the hash table will close the right child without reading any data(the child will close the corresponding sender).
2022-11-24 21:06:44 +08:00
bc699511d0 [Fix](array-function) fix array_distinct null values (#14544)
in the previous the result is:
```
mysql> select array_distinct([1,1,3,3,null, null, null]);
+-----------------------------------------------------+
| array_distinct(ARRAY(1, 1, 3, 3, NULL, NULL, NULL)) |
+-----------------------------------------------------+
| [1, 3, NULL, NULL, NULL]                            |
+-----------------------------------------------------+
1 row in set (0.00 sec)
```

after this fix, the result becomes:
```
mysql> select array_distinct([1,1,3,3,null, null, null]);
+-----------------------------------------------------+
| array_distinct(ARRAY(1, 1, 3, 3, NULL, NULL, NULL)) |
+-----------------------------------------------------+
| [1, 3, NULL]                                        |
+-----------------------------------------------------+
1 row in set (0.00 sec)
```
2022-11-24 19:07:28 +08:00
ac46922433 [fix](ut) Fix failures for BE UT macOS (#14543) 2022-11-24 17:39:37 +08:00
0c4830600d test(grouping sets) add regression test case for grouping sets (#14539)
Co-authored-by: tongyang.hty <hantongyang@douyu.tv>
2022-11-24 17:38:12 +08:00
59b31a03c4 [Improvement](agg function) support group_bit_and/group_bit_or/group_bit_xor functions (#14386) 2022-11-24 16:46:42 +08:00
608cb6c4ad [test](jdbc)add new case for mysql external table (#14530) 2022-11-24 16:36:44 +08:00
b4d8ae5204 [test](jdbc)add new pg case from other source (#14445) 2022-11-24 16:35:59 +08:00
a04e1b49ec [feature](Nereids) Implement group by grouping sets, cube and rollup (#14496)
Issue Number: close #13615

The main work:

implement grouping sets/ cube/ rollup.
fix if function Infinite loop problem.
Support for isNull transitions to legacy optimizers.
2022-11-24 16:34:31 +08:00
0680b3b4d5 [opt](nereids) adjust nereids related regression test cases (#14439)
1. in dateV2, we adjust the dir structure to avoid creating a tpch-1G database
2. use `drop table XXX`  to replace `delete * from XXX where key>0`
3. remove explain cases, because 
- the explain string itself is variable, and the case is hard to maintain
- it is original planner explain, not nereids
2022-11-24 16:02:52 +08:00
fde474609e [feature](Nereids) Add dphyp job (#14485) 2022-11-24 15:50:05 +08:00
8afe298a0f [Fix](function) fix function retention lost ARRAY's element type … (#14538) 2022-11-24 15:19:50 +08:00
2389a90cd0 [enhancement](snapshot) add missed version log when make_snapshot in engine clone task (#14284) 2022-11-24 14:51:28 +08:00
7f4cc61286 [fix](cast)prevent be from crashing when cast function is not available (#14540)
* [fix](cast)prevent be from crashing when cast function is not available

* format code
2022-11-24 14:17:49 +08:00