Commit Graph

2704 Commits

Author SHA1 Message Date
Pxl
ca64fa7954 [Bug](materialized-view) do not check key/value column when index is dup or mow (#32695)
do not check key/value column when index is dup or mow
2024-03-27 02:56:11 +08:00
ad688171f5 [fix](Nereids): handle distinct and nullable property when rewriting sum literal (#32778)
Refactored the SQL query to handle the distinct and nullable values when computing the sum of 'v' and 'v + 1' in the 't' table like:

select sum(v + 1), sum(distinct v + 1) from t
=>
select sum(v) + count(v), sum(distinct v) + count(distinct v)
2024-03-26 20:36:07 +08:00
b5a1914740 [Fix](nereids) Fix deletestmt getting catalog (#32701) 2024-03-26 20:29:03 +08:00
1b6b92a19d [improvement](mtmv) Support hll function roll up when query rewrite by materialized view (#32431)
Support hll roll up, the hll fucntion supportd is as following:

+-----------------------------------------------------------------------------------------------------------------------------------------------------+
|                      in query                    |                          in materialized view                           |        rolluped        |
+ ------------------------------------------------ + ----------------------------------------------------------------------- + ---------------------- +
| HLL_UNION_AGG(hll column)                        | hll_union(column) or hll_raw_agg(column) as column1                     | HLL_UNION_AGG(column1) |
| HLL_RAW_AGG(hll column) or HLL_UNION(hll column) |                                                                         | HLL_UNION(column)      |
| approx_count_distinct(not hll column)            | hll_union(HLL_HASH(column)) or hll_raw_agg(HLL_HASH(column)) as column1 | HLL_UNION_AGG(column1) |
| HLL_UNION_AGG(HLL_HASH(column))                  |                                                                         | HLL_UNION_AGG(column)  |
| hll_cardinality(hll_union(HLL_HASH(column)))     | hll_union(HLL_HASH(column)) or hll_raw_agg(HLL_HASH(column)) as column1 |                        |
| hll_cardinality(hll_raw_agg(HLL_HASH(column)))   | hll_union(HLL_HASH(column)) or hll_raw_agg(HLL_HASH(column)) as column1 |                        |
| HLL_RAW_AGG(HLL_HASH(column))                    | hll_union(HLL_HASH(column)) or hll_raw_agg(HLL_HASH(column)) as column1 | HLL_RAW_AGG(column1)   |
+-----------------------------------------------------------------------------------------------------------------------------------------------------+
2024-03-26 20:26:16 +08:00
0655d49a21 [enhancement](nereids) only push having as agg's parent if having just use slots from agg's output (#32414)
1. only push having as agg's parent if having just use slots from agg's output
2. show user friendly error message when item in select list but not in aggregate node's output
2024-03-26 20:26:04 +08:00
60c3372d8e [fix](Nereids): fix elimiate join by pkfk when there are multi joins (#32703) 2024-03-26 20:24:39 +08:00
Pxl
fdf6b8fe8d [Bug](repeat) fix core dump coz output slot'order on repeat node not match with pre repeat exprs (#32662)
fix core dump coz output slot'order on repeat node not match with pre repeat exprs
2024-03-26 20:22:20 +08:00
0a44de67bf [bug](distinct agg) fix distinct streaming agg not output all data (#32760)
fix distinct streaming agg not output all data
2024-03-26 20:19:36 +08:00
ad2d20348a [fix](pipeline) fix use error row desc when origin block clear #32803 (#32849)
* fix

* add case
2024-03-26 20:02:46 +08:00
c0d7a5660e [fix](paimon) support paimon with hive2 (#32455)
In order to support paimon with hive2, we need to modify the origin HiveMetastoreClient.java
to let it compatible with both hive2 and hive3.
And this modified HiveMetastoreClient should be at the front of the CLASSPATH, so that
it can overwrite the HiveMetastoreClient in hadoop jar.

This PR mainly changes:

1. Copy HiveMetastoreClient.java in FE to BE's preload jar.

2. Split the origin `preload-extensions-jar-with-dependencies.jar` into 2 jars
    1. `preload-extensions-project.jar`, which contains the modified HiveMetastoreClient.
    2. `preload-extensions-jar-with-dependencies.jar`, which contains other dependency jars.

3. Modify the `start_be.sh`, to let `preload-extensions-project.jar` be loaded first.

4. Change the way the assemble the jni scanner jar
    Only need to assemble the project jar, without other dependencies.
    Because actually we only use classed under `org.apache.doris` package.
    So remove other unused dependency jars can also reduce the output size of BE.

5. fix bug that the prefix of paimon properties should be `paimon.`, not `paimon`

6. Support paimon with hive2
    User can set `hive.version` in paimon catalog properties to specify the hive version.
2024-03-26 15:31:07 +08:00
ec43f65235 [feature](hudi) support hudi incremental read (#32052)
* [feature](hudi) support incremental read for hudi table

* fix jdk17 java options
2024-03-26 15:31:07 +08:00
7b94cfdba1 Revert "[Fix](tests) add regression tests for trino-connector (#32552)"
This reverts commit 3fc3a4650681cb519405730899a2f22f268b38c1.
2024-03-25 22:38:21 +08:00
ff0da8108b [fix](RF) fix 'Invalid value' error of RF of decimal type (#32749) 2024-03-25 22:34:19 +08:00
3fc3a46506 [Fix](tests) add regression tests for trino-connector (#32552) 2024-03-25 22:31:55 +08:00
b9788e5e37 [fix] (Nereids) fix date function rewrite on datetimev1 column bug (#32569) 2024-03-24 08:07:01 +08:00
3d14d9e379 [fix](Nereids) fix bind having aggregate failed again (#32687)
follow up #32490

add more tests and fix some cases because some sqls are valid to mysql, but failed in doris
2024-03-24 08:06:13 +08:00
35e580ec7a [fix](RF) fix 'Invalid value' error of RF of datetimev2 type for max value (#32649) 2024-03-22 22:29:50 +08:00
326a264fcd [Improvement](executor)Add spill property for workload group #32554 2024-03-22 16:38:19 +08:00
f443d6de85 [Fix](variant) filter with variant access may lead to to parition/tablet prune fall through (#32560)
Query like `select * from ut_p partitions(p2) where cast(var['a'] as int)  > 0` will fall through parition/tablet prunning since it's plan like
```
mysql> explain analyzed plan select * from ut_p where id = 3 and cast(var['a'] as int) = 789;
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Explain String(Nereids Planner)                                                                                                                                            |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| LogicalResultSink[26] ( outputExprs=[id#0, var#1] )                                                                                                                        |
| +--LogicalProject[25] ( distinct=false, projects=[id#0, var#1], excepts=[] )                                                                                               |
|    +--LogicalFilter[24] ( predicates=((cast(var#4 as INT) = 789) AND (id#0 = 3)) )                                                                                         |
|       +--LogicalFilter[23] ( predicates=(0 = __DORIS_DELETE_SIGN__#2) )                                                                                                    |
|          +--LogicalProject[22] ( distinct=false, projects=[id#0, var#1, __DORIS_DELETE_SIGN__#2, __DORIS_VERSION_COL__#3, element_at(var#1, 'a') AS `var`#4], excepts=[] ) |
|             +--LogicalOlapScan ( qualified=regression_test_variant_p0.ut_p, indexName=<index_not_selected>, selectedIndexId=10145, preAgg=ON )                             |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6 rows in set (0.01 sec)
```
with an extra LogicalProject on top of LogicalOlapScan, so we should handle such case to prune parition/tablet
2024-03-22 16:38:19 +08:00
6812b575b2 [fix](Nereids) fix bind having aggregate failed (#32490)
fix bind having aggregate failed, keep the behavior like mysql
2024-03-22 16:36:46 +08:00
01a5413e45 [fix](Nereids) filter-limit-project translate to wrong plan (#32496) 2024-03-22 16:35:47 +08:00
4de8775e17 [feat](Nereids): rewrite sum literal to sum and count (#32244)
sum(v + 2) => sum(v) + 2*count(v)
sum(v - 2) => sum(v) - 2*count(v)
2024-03-22 16:35:47 +08:00
3f36aa2d48 [chore](Nereids) remove ensure project on top join (#32562) 2024-03-22 16:35:47 +08:00
39382a9774 [fix](Nereids): just pull up alias project above join through topn (#32305) 2024-03-22 16:35:47 +08:00
66336e59e6 [fix](join) the result of left semi join with empty right side should be false, not null (#32477) 2024-03-22 16:35:43 +08:00
0f343e914a Revert "[case](Cloud) Add ssb case for hdfs vault (#32567)"
This reverts commit 60a673979e5b2f98e9cc66c77fa0d6c61b8ed0f7.
2024-03-22 15:26:09 +08:00
ebfb3418f9 [test](mtmv)Add tpch test cherry pick to branch 21 (#32611)
* [test](neredis) Add tpch test for query rewrite by materialized view (#30870)

query rewrite by materialized view sql is as following
q1, q5, q6, q8, q9, q12, q14
the other is not supported now, will be supported later

* change code usage
2024-03-22 15:20:38 +08:00
ea71472d64 [fix](build index) fix core when build index for a new column which without data (#32550) (#32669)
Co-authored-by: Luennng <luennng@gmail.com>
Co-authored-by: Tanya-W <tanya1218w@163,com>
2024-03-22 15:05:19 +08:00
23c12fd68f [fix](join) core caused by null-safe-equal join (#32623) 2024-03-22 08:53:47 +08:00
d3bdda6071 [fix](partial update) fix data correctness risk when load delete sign data into a table with sequence col (#32574) 2024-03-22 08:52:38 +08:00
55b7f7f019 [fix](inverted index) skip read index column data only for DUP and MOW table (#32594) 2024-03-22 08:52:16 +08:00
26efde2925 [test](Nereids) refine group by eliminate regression test (#32543) 2024-03-22 08:52:16 +08:00
d7a3ff1ddf [Fix](Outfile) Fix the column type mapping in the orc/parquet file format (#32281)
| Doris Type             | Orc Type                     |  Parquet Type                |
|---------------------|--------------------|------------------------|
| Date                            | Long (logical: DATE)                 |       int32 (Logical: Date)                                        |
| DateTime                    | TIMESTAMP (logical: TIMESTAMP)    |       int96                          |
2024-03-22 08:52:16 +08:00
0537952573 [Fix](auto-inc) Fix auto inc unique table case (#32393) 2024-03-22 08:52:16 +08:00
4e653b0baa (Nereids): remove test infer_set_operator_distinct(CBO) 2024-03-22 08:16:49 +08:00
48d7585d85 [enhancement](test) unique model by modify a value type from INT or BIGINT to other type (#32553) 2024-03-21 14:07:50 +08:00
dea6859e0d [refactor](jdbc catalog) refactor jdbc catalog get databases logic (#32579) 2024-03-21 14:07:50 +08:00
043113c89e [enhancement](test) unique model by modify a key type from SMALLINT to other type (#32033) 2024-03-21 14:07:50 +08:00
617cc667fe [Fix](Variant) fix variant serialize root node (#31769) 2024-03-21 14:07:50 +08:00
60a673979e [case](Cloud) Add ssb case for hdfs vault (#32567) 2024-03-21 14:07:50 +08:00
8e3d28b93a [Feature] Support Array Type compare function for nereids planner (#31701)
Support Array Type compare function for nereids planner
2024-03-21 14:07:49 +08:00
95322e2ebe [opt](variable) user variable support expression rather than literal (#32492) 2024-03-21 14:07:49 +08:00
2a1d2ad647 [fix](Nereids) decimalv2 and int/date bit arithmetic need cast to bigint (#32311) 2024-03-21 14:07:49 +08:00
b92a764665 [feature](function) Support for aggregate function foreach combiner for some error function (#31913)
Support for aggregate function foreach combiner for some error function
2024-03-21 14:07:49 +08:00
9f98200f27 [case](mtmv)MTMV external catalog case (#32390) 2024-03-21 14:07:24 +08:00
4b21c5c1cf [Enhencement](Nereids) add eliminate distinct constant rule (#32307)
select distinct 1,2,3 from tbl
=>
select 1,2,3 from (select 1, 2, 3 from tbl limit 1) as tmp
2024-03-21 14:07:24 +08:00
7484a7ba5f [fix](broker load) improve the checking of overlapping partitions of same table (#32254) 2024-03-21 14:07:24 +08:00
14c9537679 [fix](decimal) fix Arithmetic Overflow error of converting string to decimal (#32246) 2024-03-21 14:07:24 +08:00
66fe61b591 [fix](nereids)support topn-filter for non pipeline engine #32397 2024-03-21 14:07:24 +08:00
725f86a27b [fix](group commit) Fix p2 regression-test (#32270) 2024-03-21 14:07:24 +08:00