Commit Graph

8289 Commits

Author SHA1 Message Date
bcc37c9405 [fix](planner)the common type of floating and decimal should be floating type (#20634)
* [fix](planner)the common type of floating and decimal should be floating type

* fix test cases
2023-06-12 11:32:23 +08:00
4c340f2851 [Feature] (Multi-Catalog) support query hll column in doris jdbc table - part 1 (#19413)
Issue Number: close #17895
2023-06-12 11:16:19 +08:00
a6f625676b [profile](remove child) child is for node, should not be used to organize counters (#20676)
Currently, there are many profiles using add child profile to orgnanize profile into blocks. But it is wrong. Child profile will have a total time counter. Actually, what we should use is just a label.

                          -  MemoryUsage:  
                              -  HashTable:  23.98  KB
                              -  SerializeKeyArena:  446.75  KB
Add a new macro ADD_LABEL_COUNTER to add just a label in the profile.

---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-06-12 10:00:35 +08:00
c9b08d5c20 [feature](planner) multi partition create by integer column (#19597)
Create partitions use :
```
PARTITION BY RANGE(integer_col)(
        FROM (10) TO (1000) INTERVAL 50
)
```
2023-06-11 22:42:21 +08:00
8162d0062b [fix](alter) fix potential concurrent issue for alter when check olap table state normal outside write lock scope is not atomic (#20480)
now, we check some olap table state normal outside write lock scope, the table state may be changed to unnormal when we do alter operation
---------

Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-06-11 18:17:41 +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
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
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
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
fe8233863a [enhancement](stats) ignore view by default when analyze whole DB #20630 2023-06-09 14:13:54 +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
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
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
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
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
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
46c68d11aa [feature-wip](MTMV) Sync finish status only for tasks (#20441)
MTMV tasks keep finish status only to reduce the loss caused by logging.
After changes, unfinished tasks will be lost directly when FE master restarts.
2023-06-08 10:46:25 +08:00
d2d6ce5d0b [fix](nereids) add push down filter and project through cte anchor rules (#20547)
we should not plan any Filter or Project above CteAnchor, because there are project or filter under anchor sometimes.
and the whole plan can not translate to a valid plan for BE.
2023-06-08 10:34:42 +08:00
325ddab34e [conf](pipeline) turn pipeline on by default (#20458) 2023-06-08 09:20:51 +08:00
187bf14d81 [feature-wip](auto-inc)(step-1) add syntax support for duplicate table (#20284)
Co-authored-by: yifeng <cnissnzg@126.com>
2023-06-07 22:01:28 +08:00
03cb69c0ee [feature](backup-restore) Add local backup/restore not upload/download by broker (#20492) 2023-06-07 21:35:15 +08:00
09344eaab5 [feature](load) introduce single-stream-multi-table load (#20006)
For routine load (kafka load), user can produce all data for different
table into single topic and doris will dispatch them into corresponding
table.

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
2023-06-07 17:55:25 +08:00
Pxl
fbbf4c420e [Bug](Agg-State) fix agg state function get wrong input argument list (#20546)
fix agg state function get wrong input argument list
2023-06-07 17:32:48 +08:00
c910e9b78b [doc](disk)fix disk capacity doc error (#20506) 2023-06-07 15:20:04 +08:00
6b325a8458 [fix](Nereids): union output can be Alias<Slot> (#20532) 2023-06-07 15:11:07 +08:00
cd70c37402 [fix](nereids) filter and project node should be pushed down through cte (#20508)
1.move PushdownFilterThroughCTEAnchor and PushdownProjectThroughCTEAnchor into PUSH_DOWN_FILTERS rule set
2.move PushdownFilterThroughProject before MergeProjectPostProcessor
2023-06-07 10:36:32 +08:00
b83039de76 [fix](stats) Make alter column stats no forward (#20501)
For test convenient, since daily regression tests queries would be sent any FE rather than master only.
2023-06-07 10:14:44 +08:00
b65094c8df [Improvement](multi-catalog) paimon supports projection push down (#20522)
Co-authored-by: hugoluo <hugoluo@tencent.com>
2023-06-07 00:39:08 +08:00
c991249360 [enhancement](cooldown) use cooldown replica first when generating scan node (#20384) 2023-06-06 22:15:49 +08:00
82cf76f92b [fix](Nereids) join condition not extract as conjunctions (#20498) 2023-06-06 20:34:19 +08:00
05bdbce8fc [Feature](Nereids) support update unique table statement (#20313) 2023-06-06 20:32:43 +08:00
0c6292abaa [fix](stats) skip forbid_unknown_col_stats check for invisible column and internal db (#20362)
1. skip forbidUnknownColStats check for in-visible columns
2. use columsStatistics.isUnknown to tell if this stats is unknown
3. skip unknown stats check for internal schema
2023-06-06 19:07:33 +08:00
a569d371b3 [fix](Nereids) give clean error message when there are subquery in the on clause (#20211)
Add the rule for checking the join node in `analysis/CheckAnalysis.java` file. When we check the join node, we should check its' on clause. If there are some subquery expression, we should throw exception.

Before this PR
```
mysql> select a.k1 from baseall a join test b on b.k2 in (select 49);
ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: nul
```

After this PR
```
mysql> select a.k1 from baseall a join test b on b.k2 in (select 49);
ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: Not support OnClause contain Subquery, expr:k2 IN (INSUBQUERY) (LogicalOneRowRelation ( projects=[49 AS `49`#28], buildUnionNode=true ))
```
2023-06-06 16:50:20 +08:00
b1a8bb28f7 [Fix](WorkloadGroup)Fix query queue nereids bug #20484 2023-06-06 16:44:35 +08:00
48021366bf [fix](load) fix unified load redirect status delegate error (#20467) 2023-06-06 15:46:48 +08:00
13f1b90768 [Fix] (tablet) fix tablet queryable set (#20413) (#20414) 2023-06-06 15:38:01 +08:00