Commit Graph

6886 Commits

Author SHA1 Message Date
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
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
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
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
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
1dcf8a470e [fix](Nereids): fix choose id when there is enforcer in group (#34573) 2024-05-11 15:04:35 +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
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