Commit Graph

11136 Commits

Author SHA1 Message Date
8a2e0504e4 [chore](coldHeatCases) drop table first to enhance robustness (#20629) 2023-06-11 13:51:05 +08:00
3d9e520fb2 [fix](ssl) fix ssl connection bug for JDBC 8.0.19 (#20659) 2023-06-11 13:50:03 +08:00
987b29ded5 [fix](nereids)avoid to derive rowCount NaN (#20523)
the formula used to compute ndv after filter implies that the new rowCount is smaller than the original rowCount. When we apply this formula to join, we should add branch if new row count is bigger than original row count.
when new row count is bigger, the ndv is not changed.
2023-06-10 15:40:14 +08:00
87bc405c41 [Improvement](statistics)Support external table partition statistics (#20415)
Support collect statistics for HMS external table with specific partitions. Add session variables to limit the partitions to collect for whole table line number and columns statistics.
2023-06-10 12:28:53 +08:00
9a83d78dfe [Enhancement](hudi) support hudi mor table, step2 follow #19909 (#20570)
PR(https://github.com/apache/doris/pull/19909) has implemented the framework of hudi reader for MOR table. This PR completes all functions of reading MOR table and enables end-to-end queries.
Key Implementations:
1. Use hudi meta information to generate the table schema, not from hive client.
2. Use hive client to list hudi partitions, so it strongly depends the sync-tools(https://hudi.apache.org/docs/syncing_metastore/) which syncs the partitions of hudi into hive metastore. However, we may get the hudi partitions directly from .hoodie directory.
3. Remove `HudiHMSExternalCatalog`, because other catalogs like glue is compatible with hive catalog.
4. Read the COW table originally from c++.
5. Hudi RecordReader will use ProcessBuilder to start a hotspot debugger process, which may be stuck when attaching the origin JNI process, soI use a tricky method to kill this useless process.
2023-06-10 12:25:53 +08:00
206b5a4235 [doc](flink-connector) add flink cdc sync mysql database (#20486) 2023-06-10 10:52:15 +08:00
c79642781b [minor](Nereids) remove some invasive code of minidump in cascades framework (#20606) 2023-06-09 23:41:00 +08:00
def6a8ec94 [regression](nereids) check tpch sf1T and sf500 plan shape on 3 BE environment #20610 2023-06-09 22:46:40 +08:00
Pxl
ab6c1f152c [Chore](build) adjust build script about pch setting (#20637)
try to make be-ut workflow stable
2023-06-09 22:27:13 +08:00
656b9ad3da [enhancement](index) Nereids support no need to read raw data for index column that only in filter conditions (#20605) 2023-06-09 21:54:48 +08:00
0f21166110 [fix](memory) Fix runtime state default mem tracker (#20615)
start time: Wed 07 Jun 2023 06:50:14 PM CST
*** Query id: e9000000e9-eb00000073 ***
*** Aborted at 1686136356 (unix time) try "date -d @1686136356" if you are using GNU date ***
*** Current BE git commitID: 5c33dd7a2c ***
*** SIGSEGV address not mapped to object (@0x23000000235) received by PID 2131238 (TID 2132258 OR 0x7f708eff7700) from PID 565; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /mnt/hdd01/repo_center/doris_branch-2.0-beta/doris/be/src/common/signal_handler.h:413
 1# 0x00007F727BBE3090 in /lib/x86_64-linux-gnu/libc.so.6
 2# doris::AttachTask::AttachTask(doris::RuntimeState*) at /mnt/hdd01/repo_center/doris_branch-2.0-beta/doris/be/src/runtime/thread_context.cpp:43
 3# std::_Function_handler<void (doris::PTabletWriterAddBlockResult const&, bool), doris::stream_load::VNodeChannel::open_wait()::$_1>::_M_invoke(std::_Any_data const&, doris::PTabletWriterAddBlockResult const&, bool&&) at /var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
 4# doris::stream_load::ReusableClosure<doris::PTabletWriterAddBlockResult>::Run() at /mnt/hdd01/repo_center/doris_branch-2.0-beta/doris/be/src/vec/sink/vtablet_sink.h:176
 5# brpc::Controller::EndRPC(brpc::Controller::CompletionInfo const&) in /root/20230607171843-doris-branch-2.0-beta-5c33dd7a/be/lib/doris_be
 6# brpc::Controller::OnVersionedRPCReturned(brpc::Controller::CompletionInfo const&, bool, int) in /root/20230607171843-doris-branch-2.0-beta-5c33dd7a/be/lib/doris_be
 7# brpc::policy::ProcessRpcResponse(brpc::InputMessageBase*) in /root/20230607171843-doris-branch-2.0-beta-5c33dd7a/be/lib/doris_be
 8# brpc::InputMessenger::InputMessageClosure::~InputMessageClosure() in /root/20230607171843-doris-branch-2.0-beta-5c33dd7a/be/lib/doris_be
 9# brpc::InputMessenger::OnNewMessages(brpc::Socket*) in /root/20230607171843-doris-branch-2.0-beta-5c33dd7a/be/lib/doris_be
10# brpc::Socket::ProcessEvent(void*) in /root/20230607171843-doris-branch-2.0-beta-5c33dd7a/be/lib/doris_be
11# bthread::TaskGroup::task_runner(long) in /root/20230607171843-doris-branch-2.0-beta-5c33dd7a/be/lib/doris_be
12# bthread_make_fcontext in /root/20230607171843-doris-branch-2.0-beta-5c33dd7a/be/lib/doris_be
2023-06-09 21:09:07 +08:00
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