Commit Graph

6903 Commits

Author SHA1 Message Date
89d5f2e816 [fix](multi-catalog)remove http scheme in oss endpoint (#34907)
remove http scheme in oss endpoint, scheme maybe appear in url (http://bucket.http//.region.aliyuncs.com) if use http client
2024-05-18 18:42:33 +08:00
a59f9c3fa1 [fix](planner) fix unrequired slot bug when join node introduced by #25204 (#34923)
before fix, join node will retain some slots, which are not materialized and unrequired.
join node need remove these slots and not make them be output slots.

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2024-05-18 18:40:56 +08:00
435147d449 [enhance](mtmv) MTMV deal partition use name instead of id (#34910)
partition id will change when insert overwrite

When the materialized view runs a task, if the base table is in insert overwrite, the materialized view task may report an error: partition not found by partitionId

Upgrade compatibility: Hive currently does not support automatic refresh, so it has no impact
2024-05-18 18:40:29 +08:00
81bcb9d490 [opt](planner)(Nereids) support auto aggregation for random distributed table (#33630)
support auto aggregation for querying detail data of random distributed table:
the same key column will return only one row.
2024-05-18 18:40:16 +08:00
bfd875eae3 [opt](nereids) lazy get expression map when comparing hypergraph (#34753) 2024-05-18 18:38:19 +08:00
9b5028785d [fix](prepare) fix datetimev2 return err when binary_row_format (#34662)
fix datetimev2 return err when binary_row_format. before pr, Backend return datetimev2 alwary by to_string.
fix datatimev2 return metadata loss scale.
2024-05-18 18:37:41 +08:00
05605d99a9 [opt](routine-load) optimize routine load task allocation algorithm (#34778) 2024-05-18 18:37:41 +08:00
cc11e50200 [fix](mtmv)Fix slot desc wrong in query rewrite by materialized view when query is complex (#34904) 2024-05-18 18:37:10 +08:00
73419c2431 [enhance](mtmv)MTMV support hive table determine whether the data is sync (#34845)
Previously supported, this PR only turns on the switch
2024-05-18 18:35:42 +08:00
b51a4212d6 [fix](txn insert) Fix txn insert values error when connect to follower fe (#34950) 2024-05-18 18:33:55 +08:00
a07876e807 [fix](planner)correlated predicate should include isnull predicate (#34833) 2024-05-18 18:28:54 +08:00
8264078a9a [fix](nereids)4 phase agg may lost parameter in some case (#34816) 2024-05-18 18:28:41 +08:00
5719f6ff0c [fix](planner) fix date_xxx functions without complete function signature (#34761)
Problem:
When using current_date as input of functions like date_sub,
fold constant would failed cause of missing of function signature in Planner

Solved:
Add complete function signature of functions like date_sub
2024-05-18 18:26:38 +08:00
71caf88ec1 [opt](mtmv) Optimize the logic of slot mapping generate for performance (#34597)
Slot mapping is used for materialized view rewritting
given the relation mapping, the slot mapping is the same

Optimize the slot mapping genarate logic
Cache the slot mapping in materialization context by realation mapping key
2024-05-18 18:25:43 +08:00
Pxl
4a8df53553 [Chore](rollup) check duplicate column name when create table with rollup (#34827)
check duplicate column name when create table with rollup
2024-05-18 18:23:44 +08:00
38bac76b37 [opt](mtmv) Cache materialization check result for performance (#34301)
Need check materialization sql pattern in different abstract rule when rewrite by materialized view.
Such as the subClass of AbstractMaterializedViewJoinRule, MaterializedViewScanRule, AbstractMaterializedViewAggregateRule.
This check result can be cached when has checked, this can avoid unnecessary repeat check
2024-05-18 18:14:59 +08:00
30a036e7a4 [feature](mtmv) create mtmv support partitions rollup (#31812)
if create MTMV `date_trunc(`xxx`,'month')`
when related table is `range` partition,and have 3 partitions:
```
20200101-20200102
20200102-20200103
20200201-20200202
```
then MTMV will have 2 partitions:
```
20200101-20200201
20200201-20200301
```

when related table is `list` partition,and have 3 partitions:
```
(20200101,20200102)
(20200103)
(20200201)
```
then MTMV will have 2 partitions:
```
(20200101,20200102,20200103)
(20200201)
```
2024-05-18 18:14:48 +08:00
f7801948ad fix backup and restore failed between force_replication_allocation setted and not setted clusters (#34608) 2024-05-18 18:14:18 +08:00
b6409f5584 [improvement](inverted index) Disable the use of skipping write index on load (#34719)
When `skip_write_index_on_load` is turned on, users will get an error when querying for the latest data(not compacted), giving them a bad experience. And we can use `inverted_index_ram_dir_enable = true` and `inverted_index_storage_format=V2` to reduce IO and CPU consumption. So we disable it now.

1. Disable setting `skip_write_index_on_load` to `true` in create table stmt.
2. Disable setting `skip_write_index_on_load` to `true` in alter table properties stmt. You can still alter `skip_write_index_on_load` to `false`.

Co-authored-by: Luennng <luennng@gmail.com>
2024-05-18 18:07:51 +08:00
c71d0b6b22 [fix](Nereids) cast from json should always nullable (#34707) 2024-05-18 18:06:23 +08:00
5012ddd87a [fix](Nereids) fix sql cache return old value when truncate partition (#34698)
1. fix sql cache return old value when truncate partition
2. use expire_sql_cache_in_fe_second to control the expire time of the sql cache which in the NereidsSqlCacheManager
2024-05-18 18:05:31 +08:00
b3b848f862 [feature](Nereids): eliminate useless project (#34611) 2024-05-18 18:05:00 +08:00
b76cfcd007 [refactor](mtmv) Materialization context and mtmv decoupling (#34093) (#34916)
Decoupling the MTMV from the materialization context.
Change MaterializationContext to abstract which is the materialization desc.
It now has AsyncMaterializationContext sub class, can also has other type of MaterializationContext such as
SyncMaterializationContext and so on.
2024-05-17 22:54:21 +08:00
ec4414f383 revoke colum privs the second time failed 2024-05-15 23:06:51 +08:00
fa35e54350 [fix](nereids)LogicalPlanDeepCopier will lost some info when coping logical relation (#34933) 2024-05-15 22:40:32 +08:00
91a154988d [feat](Nereids): Reject Commutativity Swap for Nested Loop Joins Affecting Parallelism (#34639) (#34798) 2024-05-15 16:52:26 +08:00
3ead073905 [fix](arrow-flight-sql) Fix Arrow Flight bind wrong Host in Fqdn #34850 2024-05-15 12:38:40 +08:00
baf9a45e57 [fix](mtmv) check groupby in agg-bottom-plan when rewrite agg query by mv (#34274)
check groupby in agg-bottom-plan when rewrite and rollup agg query by mv
2024-05-15 12:38:40 +08:00
f9c42f34dd [fix](auth)Compatible with previously enabled ldap configuration (#34891) 2024-05-15 12:36:47 +08:00
30256195c3 fix check column privilege failed by hidden column (#34849)
fix check column privilege failed by hidden column: DORIS_DELETE_SIGN
2024-05-15 10:38:10 +08:00
5ce58ed773 [fix](nereids) runtime filter push-down-cte column mapping bug #34875 2024-05-15 10:31:39 +08:00
00ce05393a [fix](profile) Load profile need to be registered to get real-time profile #34852 2024-05-15 10:29:04 +08:00
7a878eb797 [fix](Export) fix some issues of Export (#34345)
1.  Forbid rollback to the old optimizer in `Export` task. Since originStmt is empty, reverting to the old optimizer when the new optimizer is enabled is meaningless.

2. Display `parallelism` in 'show export'.

3. Create an initial Map for resultAttachedInfo to avoid NullPointerException.

4. Remove the originStmt added in this PR #31020, because the `Export` statement is underlying the Outfile statement, it cannot be treated as `OriginStmt`.
2024-05-15 10:27:53 +08:00
bd41341a97 [bugfix](tvf)catch exception for fetching SchemaTableData #34856 2024-05-14 23:40:50 +08:00
7a480aab45 [fix](nereids) Push max rf into cte #34858 2024-05-14 21:05:18 +08:00
868949c8c0 fix some bugs (#34855) 2024-05-14 19:51:27 +08:00
c35fef631b fix bug in or expansion (#34851) 2024-05-14 19:39:33 +08:00
ff22128013 [fix](profile) Fix content missing of brokerload profile (#34839)
* Fix compile

* fix style

* [fix](profile) Fix content missing of brokerload profile (#33969)
2024-05-14 18:56:58 +08:00
bac51723e8 [fix](Nereids): fix some bugs in or expansion #34840
add unit test
2024-05-14 18:14:11 +08:00
47f0a6734b [fix][nereids] fix misunderstanding about bothSideShuffleKeysAreSameOrder (#34824)
Co-authored-by: zhongjian.xzj <zhongjian.xzj@zhongjianxzjdeMacBook-Pro.local>
2024-05-14 15:17:34 +08:00
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
fcf26c9224 [fix](runtimefilter)slot comparison bug #34791 2024-05-14 11:07:19 +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