Commit Graph

11125 Commits

Author SHA1 Message Date
93b53cf2f4 [improvement](exception-safe) create and prepare node/sink support exception safe (#20551) 2023-06-09 21:06:59 +08:00
abb2048d5d [performance](executor) remove repeated call within the loop in validate_column 2023-06-09 19:59:25 +08:00
54504fb61d [opt](Nereids) remove running in OptimizeGroup to avoid recompute on it parent (#20608)
we have some prunning path logical in cascades framework. However it do not work as we expected. if we do prunning on one Group, then maybe we need to do thousands of times optimization on its parent without any success result. This PR remove these prunning provisionally. We will add prunning back when we re-design it.
2023-06-09 19:16:39 +08:00
df1e526ec0 [opt](planner)(Nereids) add switch to determine if some unfixed functions will be folded on fe. (#20270)
add switch to determine if below functions could be folded on fe.
- now()
- current_date()
- current_time()
- unix_timestamp()
- utc_timestamp()
- uuid()
- rand()
2023-06-09 18:18:56 +08:00
70819fae22 [feature](alter) Add AlterDatabasePropertyStmt binlog impl (#20550) 2023-06-09 17:29:21 +08:00
a6aee1fc2c [enhancement](stats) Forbid unknown stats check for internal_column (#20535)
Ignore internal columns when enable new optimizer and forbid unknown stats
2023-06-09 16:16:11 +08:00
b6386889d5 [fix](stats) set analysis job status to finished when be crashed by mistake (#20485)
If BE crashed the error would be logged, and the analysis task would be mark as finished, which is incorrect.
In this PR, update analysis task according to the query state
2023-06-09 15:43:11 +08:00
c8bda9508e [doc](catalog) remove external table doc (#20632) 2023-06-09 14:16:44 +08:00
fe8233863a [enhancement](stats) ignore view by default when analyze whole DB #20630 2023-06-09 14:13:54 +08:00
05438eab0d remove DCHECK for rpc time (#20621) 2023-06-09 13:38:12 +08:00
3b17cc8eb3 [Improvement](column) reduce cache miss for data copy (#20583) 2023-06-09 13:10:57 +08:00
101e75d633 [pipeline](doc) Update pipeline doc (#20623) 2023-06-09 12:38:36 +08:00
44e20d9087 [feature](Nereids): push down alias into union outputs. (#20543) 2023-06-09 11:53:44 +08:00
019e2353d3 [Feature](load)RoutineLoad support multi table load (#20307)
1. Support mutli table for routine load
2. Multi-table dynamic setting table information
3. Add multi-table syntax rules
4. Add new multi-table execution plan
2023-06-09 11:52:20 +08:00
f0777f74ad [Bug](mutil-catalog) PaimonColumnValue always null (#20592)
Co-authored-by: hugoluo <hugoluo@tencent.com>
2023-06-09 09:41:14 +08:00
a1a587fec6 [fix](replay) fix truncate partition name need case insensitive (#20098)
truncate table with partition name need case insensitive
2023-06-09 09:34:55 +08:00
88911c6c28 [Fix](2PC) fix timeout config is not avaible for commit phase in 2pc (#20423)
fix config::txn_commit_rpc_timeout_ms is not available for commit phase in 2pc.
2023-06-09 09:33:58 +08:00
7b85ec5b08 [fix](multi-catalog)fix hive catalog docs, obs impl, dlf properties (#20342)
1. fix hive catalog docs 
2. fix dlf properties
3. fix obs impl
2023-06-09 09:18:43 +08:00
b60860c5e5 [refactor](profile) refactor the join profile when its shared hash table (#20391)
in join node, if it's broadcast_join
and shared hash table, some counter/timer about build hash table is useless,
so we could add those counter/timer in faker profile, and those will not display in web profile.
2023-06-09 08:59:49 +08:00
4c6df9062e [fix](DECIMALV3)fix cumulative precision when literal and DECIMALV3 operations in Legacy (#20354)
The precision handling for division with DECIMALV3 is as follows (excluding cases where division increases precision):

(p1, s1) / (p2, s2) ----> (p1 + s2, s1)

However, due to precision loss in division, it is considered to increase the precision of the left operand:

(p1, s1) / (p2, s2) =====> (p1 + s2, s1 + s2) / (p2, s2) ----> (p1 + s2, s1)

However, the legacy optimizer repeats the analyze and substitute steps for an expression, which can result in the accumulation of precision:

(p1, s1) / (p2, s2) =====> (p1 + s2, s1 + s2) / (p2, s2) =====> (p1 + s2 + s2, s1 + s2 + s2) / (p2, s2)

To address this, the previous approach was to forcibly convert the left operand of DECIMALV3 calculations. This results in rewriting the expression as:

(p1, s1) / (p2, s2) =====> cast((p1, s1) as (p1 + s2, s1 + s2)) / (p2, s2)

Then, during the substitution step, a check is performed. If it is a cast expression, the expression modified by the cast is extracted:

cast((p1, s1) as (p1 + s2, s1 + s2)) =====> (p1, s1)

protected Expr substituteImpl(ExprSubstitutionMap smap, ExprSubstitutionMap disjunctsMap, Analyzer analyzer) {
        if (isImplicitCast()) {
            return getChild(0).substituteImpl(smap, disjunctsMap, analyzer);
        }
This way, there won't be repeated analysis, preventing the continuous increase in precision. However, if the left expression is a constant (literal), theoretically, the precision would continue to increase. Unfortunately, the code that was removed in this PR (#19926) obscured this issue.

for (Expr child : children) {
    if (child instanceof DecimalLiteral && child.getType().isDecimalV3()) {
      ((DecimalLiteral)child).tryToReduceType();
    }
}
An attempt will be made to reduce the precision of literals in the expressions. However, this code snippet can cause such a bug.

mysql [test]>select cast(1 as DECIMALV3(16, 2)) /  cast(3 as DECIMALV3(16, 2));
+-----------------------------------------------------------+
| CAST(1 AS DECIMALV3(16, 2)) / CAST(3 AS DECIMALV3(16, 2)) |
+-----------------------------------------------------------+
|                                                      0.00 |
+-----------------------------------------------------------+
1.00 / 3.00, due to reduced precision, becomes 1 / 3.
<--Describe your changes.-->
2023-06-09 08:58:55 +08:00
079fb0e56d [improvement](config)update FE config max_running_txn_num_per_db default value (#20478)
image update FE config max_running_txn_num_per_db default value: old value : 100 new value : 1000
2023-06-09 08:54:37 +08:00
4c6b99d1f9 [Fix](orc-reader) Fix the inner reader of MergeRangeFileReader is not correct when creating MergeRangeFileReader in orc reader. (#20393)
Fix the inner reader of MergeRangeFileReader is not correct when creating MergeRangeFileReader in orc reader.
2023-06-09 08:53:27 +08:00
845d459f05 [Fix](orc-reader) Fix some bugs of orc lazy materialization. (#20410)
Fix some bugs of orc lazy materialization(#18615)
- Fix issue causing column size to continuously increase after `execute_conjuncts()` by calling `Block::erase_useless_column()`.
- Fix partition issues of orc lazy materialization. 
- Fix lazy materialization will not be used when the predicate column is inconsistent with the orc file.
2023-06-09 08:53:01 +08:00
fa785f3b24 [chore](proto) make some required fields optional for compability (#20609) 2023-06-09 08:51:01 +08:00
bd5a26f240 [improvement](recover) Default disable check tablet path (#20565)
change check tablet path interval's default value to -1
2023-06-09 08:47:39 +08:00
c441cbf402 [Fix](dyncmic-partition) Check bucket size before find tablet. (#20488)
Co-authored-by: 王翔宇 <wangxiangyu@360shuke.com>
2023-06-09 08:44:41 +08:00
d03bd73795 [bug](udaf) fix java-udaf can't exectue add function (#20554)
In some case of agg function, maybe running as streaming agg firstly,
this will call the add function when serialize, so need implement add function also.
2023-06-09 08:44:12 +08:00
195beec3a8 [Fix](external scan node)Use consistent hash to collect BE only when the file cache is enabled. #20560
Use consistent hash to collect BE only when the file cache is enabled. And move the consistent BE assign code to FederationBackendPolicy.
Fix explain split number and file size incorrect bug.
2023-06-09 08:43:12 +08:00
14fe95578e [enhancement](heartbeat) print a warning log for long running heartbeat (#20559) 2023-06-09 08:39:35 +08:00
6afb09e7ba [typo](fix)Fixed documentation for some string functions (#20598) 2023-06-09 01:43:01 +08:00
e1184bf4dc [fix](dbt) dbt incremental append (#20513) 2023-06-09 01:41:33 +08:00
234be0c517 [regression-test](test_point_query) fix output (#20604) 2023-06-09 00:13:18 +08:00
5468d1fa69 [typo](docs)fix get start doc download and Decompress (#20558) 2023-06-08 22:20:11 +08:00
dd71e101d3 [fix](case expr) fix coredump of case for null value (#20564)
be coredump when when expr is null:
2023-06-08 20:05:23 +08:00
a759b6535b [test](regression) Add cases to test cast function substitution (#20481)
This is a mirror to pr #20479, master do not have this problem, but test cases also need to be added
2023-06-08 19:56:51 +08:00
e801e3b737 [fix](memory) Fix crash at bthread_setspecific in brpc::Socket::CheckHealth() (#20450)
Only switch to bthread local when modifying the mem tracker in the thread context. No longer switches to bthread local by default when bthread starts
mem tracker increases brpc IOBufBlockMemory memory
remove thread mem tracker metrics
2023-06-08 19:48:19 +08:00
Pxl
a15a0b9193 [Chore](build) use file(GLOB_RECURSE xxx CONFIGURE_DEPENDS) to replace set cpp (#20461)
use file(GLOB_RECURSE xxx CONFIGURE_DEPENDS) to replace set cpp
2023-06-08 19:36:21 +08:00
4faee4d8fd [Fix](multi-catalog) Fix be crashed when query hive table after schema changed(new column added). (#20537)
Fix be crashed when query hive table after schema changed(new column added).

Regression Test: test_hive_schema_evolution.groovy
2023-06-08 18:10:36 +08:00
41d7c535f2 [fix](regression-test) add sync after insert into table for nereids case (#20516) 2023-06-08 17:52:36 +08:00
3054574bc1 [fix](load) fix ctx nullptr core in flush_single_memtable (#20573) 2023-06-08 17:40:02 +08:00
Pxl
a56449f86e [Bug](Agg-state) try to make test_agg_state stable (#20574)
try to make test_agg_state stable
2023-06-08 17:17:51 +08:00
a68fc551f0 [bug](cooldown) Fix async_write_cooldown_meta and snapshot cooldowned version not continuous bug (#20437) 2023-06-08 15:35:35 +08:00
Pxl
5fe7106b83 [Bug](planner) fix pre condition check fail on max(null) (#20509)
fix pre condition check fail on max(null)
2023-06-08 14:49:52 +08:00
Pxl
22985af4d7 [Bug](pipeline) set SourceState to MORE_DATA when UnionSourceOperator have const_expr/data_queue->remaining_has_data (#20557)
set SourceState to MORE_DATA when UnionSourceOperator have const_expr/data_queue->remaining_has_data
2023-06-08 14:47:35 +08:00
7f39d58e92 [typo](docs) fix some description error about segcompaction_small_threshold (#20421) 2023-06-08 14:31:04 +08:00
6702b6ca57 [Fix](hive-catalog) Fallback to refresh catalog when hms events are missing (#20227)
This error can not be recovered (the relevant events in hms may have been deleted and can not recovered), so we need a fallback.
2023-06-08 13:43:10 +08:00
ee4c041444 [doc](flink) add flink delete column from kafka specified columns (#20545) 2023-06-08 13:42:27 +08:00
f429276863 [typo(docs)Change docker docs DorisImage version (#20580) 2023-06-08 13:41:48 +08:00
43811ea989 [improvement](docker)Change docker shell DorisImage version (#20581) 2023-06-08 13:41:17 +08:00
24fb05ec83 [Bug](row-store) Fix row store with materialize index (#20356)
If a query hits a materialized view that has row storage enabled, but the row storage column is not present in the materialized view, it will result in a query crash. Therefore, it is necessary to include the row storage column when creating the materialized view, and serialize the row storage column during the execution of SchemaChange.
2023-06-08 10:55:22 +08:00