Commit Graph

18572 Commits

Author SHA1 Message Date
0deb629d07 [fix](Nereids): clone the producer plan and put logicalAnchor generated by Or_Expansion above logicalSink (#34771)
* put cte anchor on the root

put logicalAnchor on root

clone plan of cte consumer

* fix unit test
2024-05-14 15:05:27 +08:00
5ece07ab8c [faultinjection](test) add some fault injection in pipeline task method 2024-05-14 15:01:32 +08:00
9491b7d422 [fix](iceberg) prevent coredump if read position delete file failed (#34802) 2024-05-14 14:03:33 +08:00
fcf26c9224 [fix](runtimefilter)slot comparison bug #34791 2024-05-14 11:07:19 +08:00
95b05928fd [fix](compaction) fix time series compaction merge empty rowsets priority #34562 (#34765) 2024-05-14 09:10:09 +08:00
104284bd6f [Refactor](jdbc catalog) Enhance Field Handling in JdbcFieldSchema Using Optional for Better Null Safety (#34730)
In some cases, using Resultset.getxxx cannot correctly handle null data, so I use Optional to enhance the fields of JdbcFieldSchema for better type mapping when some results are null.
2024-05-13 22:37:35 +08:00
22d4543346 [refactor](jdbc catalog) split sap_hana jdbc executor (#34772) 2024-05-13 22:36:52 +08:00
0ae1b9c70a [chore](remove code) Remove dragonbox related (#34528)
* Revert "[refactor](mysql result format) use new serde framework to tuple convert (#25006)"

This reverts commit e5ef0aa6d439c3f9b1f1fe5bc89c9ea6a71d4019.

* run buildall

* MORE

* FIX
2024-05-13 22:16:57 +08:00
5046fa2bea [improvement](mtmv) Split the expression mapping in LogicalCompatibilityContext for performance (#34646)
Need query to view expression mapping when check the logic of hyper graph is equals or not.
Getting all expression mapping one-time may affect performance. So split the expresson to three type
JOIN_EDGE, NODE, FILTER_EDGE and get them step by step.
2024-05-13 22:15:35 +08:00
c62ff0b672 [fix](auth) Disable revoke 'admin' from 'admin'` (#34644) 2024-05-13 22:15:16 +08:00
db15c811f8 [opt](Nereids) enhance properties regulator checking (#34603)
Enhance properties regulator checking:
(1) right bucket shuffle restriction takes effective only when either side has NATUAL shuffle type.
(2) enhance bothSideShuffleKeysAreSameOrder checking if taking EquivalenceExprIds into consideration.


Co-authored-by: zhongjian.xzj <zhongjian.xzj@zhongjianxzjdeMacBook-Pro.local>
2024-05-13 22:15:16 +08:00
d6f300ec62 [fix](Nereids) empty set handle in fe should use result output (#34676) 2024-05-13 22:15:16 +08:00
3ef5ed1ad0 [opt](Nereids) normalize column name of output file (#34650)
when do export to output file, normalize column name.
For example

> SELECT 1 > 2 INTO OUTFILE "..."

the column name of 1 > 2 will be __greater_than_0
2024-05-13 22:12:46 +08:00
792d87c87c [bugfix](multi catalog) fixed an issue in master where hive directory field separator was an empty string causing it to be core (#34594)
Fixed an issue in master where hive directory field separator was an empty string causing it to be core.
2024-05-13 22:12:16 +08:00
e602048f73 [fix](Nereids) Fix materialized view rule to check struct info validity (#34665)
This PR improves the materialized view rule by adding additional validity checks for the struct info. The changes include:

  1. In AbstractMaterializedViewRule.java:
    * Modified the checkPattern method to also check the validity of the struct info using context.getStructInfo().isValid().
    * Updated the error message for invalid struct info to include the view plan string for better debugging.

  2. In StructInfo.java:
    * Enhanced the isValid() method to ensure that all nodes in the hyper graph have non-null expressions, in addition to the existing validity check.

These changes ensure that the materialized view rule properly validates the struct info before proceeding with the optimization. It prevents invalid struct info from being used and provides more detailed error messages for debugging purposes.

The additional validity check in StructInfo.isValid() verifies that all nodes in the hyper graph have non-null expressions, which is necessary for the materialized view rule to function correctly.

By incorporating these validity checks, the materialized view rule becomes more robust and can handle invalid struct info gracefully, improving the overall stability and reliability of the optimization process.
2024-05-13 22:11:53 +08:00
11175208df [fix](delete) storage engine delete do not support bitmap (#34710) 2024-05-13 22:07:53 +08:00
40a1041651 [fix](jdbc catalog) fix jdbc table checksum and query jdbc tvf (#34780) 2024-05-13 18:08:18 +08:00
20a6f2a659 [Cherry-Pick](branch-2.1) Pick "Fix partial update case introduced by #33656 (#34260)" (#34767) 2024-05-13 17:00:04 +08:00
4150971e07 2.1.3-rc07 2024-05-12 22:22:09 +08:00
cdc950f2c3 [improvement](spill) improve spill log printing 2024-05-12 19:33:27 +08:00
755757e57c check pushDownContext validation after withNewProbeExpression() (#34704) (#34737)
when the runtime filter target to a constant, the PushDownContext.finalTarget is null.
in this case, do not pushdown runtime filter.
example:
select * from (select 1 as x from T1) T2 join T3 on T2.x=T3.x
when push down RF(T3.x->T2.x) inside "select 1 as x from T1", the column x is a constant, and the pushDown stopped.

(cherry picked from commit 7f06cf0a0125d84c41e1edbb71366e293f70239d)
2024-05-12 18:09:13 +08:00
7a172a55ab [fix](memory) Fix prune all LRU Cache based on number #34601 (#34736) 2024-05-12 11:47:53 +08:00
ca9eb56233 [Fix](functions) fix strcmp return value #34565 2024-05-12 09:49:38 +08:00
a8be47f3ff [fix](fs) Close local file writer when downloading via broker fs (#34714) 2024-05-12 09:45:24 +08:00
cadbbdd2c0 [fix](config) for compatibility issue of log dir config (#34734)
* [fix](config) for compatibility issue of log dir config

* 1
2024-05-12 09:44:50 +08:00
20e2d2e2f8 [Fix](executor)Fix workload thread start failed when follower convert to master 2024-05-12 09:30:14 +08:00
11360b27a2 [fix](catalog) fix potential catalog cache dead lock #34609 (#34614)
bp #34609
2024-05-11 18:06:56 +08:00
e23a89f0da fix compile error 2024-05-11 15:36:06 +08:00
14d0433a76 [improve](path gc) Execute path gc interval adaptive to disk size (#34538) 2024-05-11 15:04:35 +08:00
e417a5cc36 [fix](replication_allocation) fix two problems for force_olap_table_replication_allocation #34554 2024-05-11 15:04:35 +08:00
9915862bf7 [opt](nereids)estimate rowcount for is-null filter when column stats are not available (#34519)
* estimate rowcount for is-null filter when column stats are not available
2024-05-11 15:04:35 +08:00
c742a327e6 [Fix](Planner) add date/month/year add function fe constant fold with dateV2/dateTimeV2 (#34483)
Problem and Cause:
In original planner, date_add function would choose different data type of datetime or datev2. Which when original planner choose datev2 as constant date type. Fe could not folding date_add function because missing of function signature of folding constant date_add(datev2, int)

Solved:
Add corresponding function signatures of date_add/months_add/years_add in original planner
2024-05-11 15:04:35 +08:00
958f1a2d2d [enhance](mtmv) add baseTablesOneLevel for MTMVRelation and MTMVRelationManager (#34593)
baseTables in MTMVRelation  stores all baseTables in the nested materialized view,
now adding baseTablesOneLevel to only store the baseTables at the current level.
2024-05-11 15:04:35 +08:00
719e50f353 [fix](json function) fix failed when json_exists_path use not null input (#34289) 2024-05-11 15:04:35 +08:00
1dcf8a470e [fix](Nereids): fix choose id when there is enforcer in group (#34573) 2024-05-11 15:04:35 +08:00
Pxl
1ff4dc8f85 [Bug](runtime-filter) fix coredump won change_null_to_true when argument column is not null… (#34602)
fix coredump won change_null_to_true when argument column is not nullable
2024-05-11 15:04:35 +08:00
373de3e49d [fix](regression test) fix unstable case auto bucket test (#34635) 2024-05-11 15:04:35 +08:00
ca1fd460b9 [fix](keyword) let some keyword non-reserved (#34613) (#34701)
pick from master #34613
commit id 8ba5748905fb90cce30176303705be29db08d3ea

let below keyword as non-reserved
- CONSTRAINTS
- IPV4
- IPV6
- KW_MATCH_ANY
- KW_MATCH_ALL
- KW_MATCH_PHRASE
- KW_MATCH_PHRASE_PREFIX
- KW_MATCH_REGEXP
- KW_MATCH_PHRASE_EDGE
- KW_MATCH_ELEMENT_EQ
- KW_MATCH_ELEMENT_LT
- KW_MATCH_ELEMENT_GT
- KW_MATCH_ELEMENT_LE
- KW_MATCH_ELEMENT_GE
- VARIANT
2024-05-11 15:01:19 +08:00
659f7ef2af [refactor](Nereids)refactor runtime filter generator (#34275) (#34696)
this pr revert the modification on clucene introduced by pr #34682
2024-05-11 12:04:41 +08:00
2392477f76 [test](shuffle) test insert row count when rows filtered by ExchangeNode (#34657) 2024-05-11 11:47:49 +08:00
8c237e82a3 [Bug](exec) fix intersections/differences bug (#34675) 2024-05-11 11:45:31 +08:00
58c19e33b3 [fix](round) Fix incorrect decimal scale inference in round functions (#34471)
* FIX NEEDED

* FORMAT

* FORMAT

* FIX TEST
2024-05-11 11:42:12 +08:00
0a79c547ff [Refactor](Sink) Remove is_append mode in table sink (#34684)
Remove the is_append mode from the sink component due to the following reasons:
1. The performance improvement from this mode is relatively minor, approximately 10%, as demonstrated in previous benchmarks.
2. The mode complicates maintenance. It requires a separate data writing path to avoid copying, which increases complexity and poses a risk of potential data loss.

I've already test the compability with previous version
2024-05-11 11:20:10 +08:00
7ba66c5890 [branch-2.1](routine-load) do not schedule task when there is no data (#34654) 2024-05-11 11:01:18 +08:00
dd1b54cf62 [pick](nereids)Runtime filter pushdown refactor for branch-2.1 (#34682)
* [refactor](Nereids)refactor runtime filter generator (#34275)

1. unify the process of generating rf for hash join and for nested loop join
2. fix some bugs in generating rf
3. remove some duplicated check

(cherry picked from commit 07267faac0d9c6ef3bb1fd4ee101b4c761c8a2f2)

* [refactor](nereids) do not deny a runtime filter by removing an entry in aliasMap (#34559)

in current version, there are 2 approaches to verify whether a join condition can be used to generate a runtime filter, they are
1. remove the output slot from aliasMap
2. pushDownVisitor.visit(...) return false
the 1st approach has some drawbacks, we prefer to the 2ed approach.
In this pr, all the cases are handled by the 2ed approach, and remove the related code for the 1st approach.

(cherry picked from commit a29082bf31e66efa2df193b38347e610f2bf7464)

* rebase
2024-05-11 09:44:24 +08:00
e38801968d [Fix](functions) Fix bug in makedate and str_to_date functions 2024-05-10 22:14:25 +08:00
d5d6c7f8a4 [opt](nereids) optimize str-like-col range filter estimation (#34542)
we have an order reserved mappping from string to double.
for string column A, we have double values for A.min and A.max.
when estimating A<"abc", A.min/max could be used to judge whether 'abc' is between A.min and A.max, but it cannot be used to do range estimation. suppose "abc" is mapped to double x. if we compute selectivity by formula "sel = (x-A.min)/(A.max-A.min)", we are likely to obtain extreme values.
2024-05-10 22:14:00 +08:00
Pxl
e2ea54c0a7 [Improvement](sink) remove unused check on string's write_column_to_mysql (#34491)
remove unused check on string's write_column_to_mysql
2024-05-10 22:13:05 +08:00
ec34bc0386 [bug](config) Fix modifying label_num_threshold does not take effect (#34575) 2024-05-10 22:12:17 +08:00
aa684d85d7 [Bug](Variant) fix rapidjson::Allocator may cause mem allocate issue when build with DENABLE_CLANG_COVERAGE (#34150) 2024-05-10 22:12:00 +08:00