Commit Graph

8276 Commits

Author SHA1 Message Date
e4b894a318 [Bug](remote) Fix BE crash because of call the future's get method twice (#12357)
call the future's get method once and save it.
2022-09-07 10:11:27 +08:00
445f0882d1 [Enhancement](log) improve error msg for delta writer fail (#12121) (#12360)
Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
2022-09-07 10:10:51 +08:00
de9b9b3e8e [chore](ut) enable asan core dump when running be ut (#12371) 2022-09-07 10:09:18 +08:00
3485dfa927 [chore](profile) add some counters in aggregatation & sender (#12385) 2022-09-07 10:09:05 +08:00
d410797200 [fix](regression p0) fix regression p0 test qt_window_hang2 always failed because of timeout #12388
Co-authored-by: wuhangze <wuhangze@jd.com>
2022-09-07 10:08:12 +08:00
232d17efea [Enhancement](sparkload) cast the src slot types of bitmap columns to bitmap when FE push tasks in spark load (#12394)
In the current spark load implementation, the types of source data, that BE reads from the Broker, are all set to varchar.
However, the two types of varchar and bitmap are not compatible anymore after version 1.1.0, which will cause spark load failure.

An example of spark load error message:

detailMessage = type not match, originType=VARCHAR(*), targeType=BITMAP
Describe your changes.

Set the src type of the bitmap columns from varchar to bitmapwhen fe pushtasks.
2022-09-07 10:07:38 +08:00
9ccc39c164 [Enhancement](regression) add regression tests for executeSQL http rest api #12265 2022-09-07 10:02:37 +08:00
a465549f5e [feature](Nereids)support parse and analyze having clause (#12129)
Implement the having clause for Nereids Planner.

NOTE:

This PR aims at making Nereids Planner generate the correct logical plan and physical plan only. The runtime correctness is not the goal in this PR due to GROUP BY is not ready in Nereids Planner.
2022-09-07 09:47:03 +08:00
922b04fdc1 [Improvement](vectorized) change static_cast to assert_cast for reference (#12379)
* [Improvement](vectorized) change `static_cast` to `assert_cast` for reference
2022-09-07 09:27:13 +08:00
772e5907f2 [enhancement](test) add some p0 cases (#12240) 2022-09-07 09:10:42 +08:00
5f255af065 [Enhancement](docker): Add elasticsearch docker file (#12377) 2022-09-07 08:47:10 +08:00
893567628e [fix](exec-node) fix nullptr of runtime state (#12395)
Remove default nullptr runtime state, which is very error-prone
2022-09-07 08:46:42 +08:00
55fb90d6ae [feature](Nereids)add colocate, shuffle and bucket shuffle join algorithm to Nereids (#11976)
This PR
1. add support below join algorithm already supported by legacy to Nereids
- colocate join
- bucket shuffle join
- shuffle join
- broadcast join

2. update all cost enforce derive utils
- ChildOutputPropertyDeriver
- EnforceMissingPropertiesHelper
- RequestPropertyDeriver

3. add a local quick sort plan used in enforce
4. set PhysicalProperties to PhysicalPlan when choose best plan from memo
5. rename Job#pushTask to Job#pushJob
2022-09-07 00:31:21 +08:00
4c36e3dfa6 [fix](Nereids)LogicalAggregate's equals and hashCode missing two attributes (#12393)
After applying NormalizeAggregate rule, owner groups of all aggregate children are removed.
The root cause is the new aggregate node is regarded as the old aggregate node, because LogicalAggregate.equals() does not take some attributes ("normalized", "disassembled") into account.
2022-09-07 00:07:26 +08:00
3a0aae1b82 [enhancement](explain)add projections and output id in explain string (#12358)
In earlier PR #11842, we add the ability of projection on each ExecNode.
But, we cannot get the projection expr list in explain. This is inconvenience to debug.
This PR add them into explain string if they exist.
2022-09-06 21:03:02 +08:00
b8cc576cba [fix](array-type) add data valid check for ARRAY type while insert or load (#12283)
Add data valid check for ARRAY type while insert or load
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-09-06 20:48:58 +08:00
c975d71fd4 [typo](docs)Sql blacklist documentation fix (#12376)
Sql blacklist documentationfix
2022-09-06 19:34:05 +08:00
b398fd60fc [DOCS](function) Add docs for new time functions (#12382)
Add docs for new time functions
2022-09-06 19:33:41 +08:00
7c2da89518 [docs](spark-load) set hadoop env (#12342)
(spark-load) set hadoop env
2022-09-06 16:41:38 +08:00
4e95b3afaf [test](nereids) add subquery regression Testing (#12372)
Added regression test of sub-queries. Currently only associated sub-queries are added. Non-associated sub-queries will be added after project revision.
2022-09-06 16:37:17 +08:00
f1507f93ee [enhancement](chore)add single empty line rule to fe check style for Nereids (#12365) 2022-09-06 14:19:59 +08:00
4a55b504c0 [feature-wip](parquet-reader) bug fix, get the correct group reader (#12294)
Fix the problem that cannot read the lineitem table of TPCH , and the error of allocate memory
Co-authored-by: jinzhe <jinzhe@selectdb.com>
2022-09-06 13:59:35 +08:00
d7dedfadad [fix](nereids) fix dead loop in unnesting subquery rule (#12345)
[fix](nereids) fix dead loop in unnesting subquery rule
2022-09-06 11:50:30 +08:00
cf5d194fe1 [enhancement](array-type) Split Array Offsets and String Offsets (#12341)
In old Doris version string offsets are 32bit, but it is not enough for Array type.
If we change string offsets from 32bit to 64bit, there will be problem if we upgrade BE one by one. Because at the same time 32bit Offsets and 64 bit Offsets String will exist at the same time.
As a result, we separate the Codes for Array Offsets.
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-09-06 11:18:27 +08:00
53b79d5a8c [Enhancement](restore) new add the property of reserve_replica to restore statement (#11942)
Add a new property called 'reserve_replica', which means you can
get a table with same partitions with the same replication num
as before the backup.

Co-authored-by: Stalary <stalary@163.com>
Co-authored-by: camby <104178625@qq.com>
2022-09-06 10:32:21 +08:00
2019cf9406 [regression](test) add tpcds sf1 unique test (#12268) 2022-09-06 10:12:00 +08:00
86fa0e38e2 [fix](join) hash join should use children's output tuple ids not output tableref ids (#12261) 2022-09-06 09:53:45 +08:00
f2aa87d797 Add ctas support config key type ut and doc. (#12327) 2022-09-06 09:16:02 +08:00
190717dbcc [enhancement](chore)add single space separator rule to fe check style (#12354)
Some times, our code use more than one space as separator by mistake. This PR add a CheckStyle rule SingleSpaceSeparator to check that for Nereids.
2022-09-05 21:59:58 +08:00
b8e38b9167 [Bug](load) block call clear_column_data may have ref not equal 1 (#12350) 2022-09-05 20:40:40 +08:00
0deee72a63 About the modification of broker load specifying hdfs user name parameter (#12330)
About the modification of broker load specifying hdfs user name parameter
2022-09-05 19:34:26 +08:00
a47eb55d7c [regression](load)split dataset to cover more situation (#12311) 2022-09-05 19:25:01 +08:00
e175a7ed63 [fix](memtracker) Fix the exceeded limit of the first query execution (#12332)
In some cases, when the user executes the query for the first time, an error of the exceeded mem limit will be reported, and the query will be successful only after the second execution.

This is because when the query is executed for the first time, the memory consumed by adding the page cache and other caches is recorded in the query mem tracker, hoping to unify the behavior of multiple queries.

A temporary solution, remove the hook of scanner thread, test clickbench q13

Before removing the scanner thread hook
Enable page cache: 3G for the first query, 3G for the tracker; 900M for the second query, 900M for the tracker.
Turn off page cache: 1.9G for the first query, 1.9G for the tracker; 900M for the second query, 900M for the tracker
After removing the scanner thread hook and fix MemTrackerLimiter::cache_consume_local bug
Enable page cache: 2916M for the first query, 1147M for the tracker; 979M for the second query, 1144M for the tracker
Turn off page cache: 1809M for the first query, 1147M for the tracker; 975M for the second query, 1145M for the tracker
TODO, a better solution is to track storage-related memory separately, in the scanner thread. Otherwise, it is impossible to know where the process memory grows when querying.
2022-09-05 19:22:46 +08:00
05f6e1b33d [fix](memtracker) Fix open query profile to print the complete mem limit exceed log #12339 2022-09-05 19:21:43 +08:00
38937c15d7 [typo](streamload) fix typo and remove useless method declaration #12343 2022-09-05 19:16:36 +08:00
698bae09b2 [fix](Nereids)get NPE and group not be optimized when add REWRITE rule to Cascades Optimzer (#12346)
Fix some bugs when add REWRITE rule to Cascades Optimizer
- all rule should set as not rewrite rule when use them in Cascades Optimizer
- IMPLEMENT rule promise should large than others since we should do exploration first.
2022-09-05 19:11:48 +08:00
f466a072d8 fix bug: tpch-q12 invalid type (#12347)
In old planner, Predicate set its type in analyzeImpl(). However, function analyzeImpl() is in old planner path, but not in nereids path. And hence the type is invalid.

Because all predicate has type bool, we set its type in constructor.
2022-09-05 19:09:27 +08:00
dadfd85c40 prune for agg with constant expr (#12274)
Currently, nereids doesn't support aggregate function with no slot reference in query, since all the column would be pruned, e.g.

SELECT COUNT(1) FROM t;

This PR reserve the column with the smallest amount of data when doing column prune under this situation.

To be noticed, this PR ONLY handle aggregate functions. So projection with no slot reference need to be handled in future.
2022-09-05 19:09:00 +08:00
8bfb89c100 [feature-wip](array-type) Add some regression tests for nested array (#12322)
#11392 made _input_block in each BetaRowsetReaders sharable. However, for some types (e.g. nested array with more than 1 depth), the _column_vector_batches in RowBlockV2 can be nested which means that there is a ColumnVectorBatch inside another ColumnVectorBatch. In this case, the data of inner ColumnVectorBatch
may be corrupted because the data of _input_block is copied shallowly to the _output_block.
2022-09-05 14:05:24 +08:00
3b104e334a [Bug](load) fix missing nullable info in stream load (#12302) 2022-09-05 13:41:28 +08:00
7b352c93ff [improvement](sink) avoid frequent allocation and deallocation when serializing block (#12310) 2022-09-05 12:23:43 +08:00
2398cd3bb6 [enhancement](Nereids)print slot name in explain string (#12272)
Currently, explain string print all expression as slot id, e.g. `<slot 1>`.
This PR, print its name with slot id instead, e.g. `column_a[#1]`. For details:
- print qualified table name for OlapScanNode
- print NamedExpression name with SlotId instead of just SlotId
- OlapScanNode's node name use "OlapScanNode" instead of table name
2022-09-05 11:31:35 +08:00
e5f3f0e730 [typo](docs) mix of SSD and HDD disks should specify the storage directory only (#12309)
add notice of storage
2022-09-05 09:23:34 +08:00
74b6eaf44b [typo](docs)Replace table link fix (#12317) 2022-09-05 08:29:41 +08:00
7929500608 [typo](docs)The table_function calling reset() function should set _eos to false #12323 2022-09-05 08:29:19 +08:00
7f10fa9768 [fix](compile)compile error when use clang on aarch64 platform (#12319) 2022-09-05 08:28:51 +08:00
d5e5afe437 [Bug](function) disable LUT for yearweek (#12324) 2022-09-05 08:27:43 +08:00
ef37396b63 [fix](dbt)fix dbt incremental bug (#12280) 2022-09-04 16:40:40 +08:00
81664fd78c github workflow build docs check fix (#12318)
github workflow build docs check fix
2022-09-03 21:32:43 +08:00
90a0baf5f8 [fix](array-type) Forbid ARRAY<NOT_NULL(T)> temporarily (#12262)
Currently, there are still lots of bugs related to ARRAY<NOT_NULL(T)>.

We decide that we don't support ARRAY<NOT_NULL(T)> types at the first version and all elements in ARRAY are nullable.

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-09-03 14:26:08 +08:00