Commit Graph

3050 Commits

Author SHA1 Message Date
4e4f3d204e [feat](Nereids) push down predicates with multi columns through LogicalWindow and LogicalPartitionTopN (#36828) (#36981)
cherry-pick #36828 to branch-2.1

The requirement for predicate pushdown through the window operator is
that the partition by slots of the window contains all slots in the
predicate. The original implementation of doris only allows predicate
pushdown with one slot. This PR relaxes this restriction and allows for
predicate pushdown with multiple slots. The same applies to the
predicate pushdown of the LogicalPartitionTopN operator. The following
sql is an example.

select
	*
from
	(
	select
		row_number() over(partition by id, value1 order by value1) as num,
		id,
		value1
	from
		push_down_multi_column_predicate_through_window_t ) t
where
	abs(id + value1)<4
	and num <= 2;


Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
2024-07-04 21:00:08 +08:00
55636e8035 [test](migrate) move 3 cases from p2 to p0 (#36957) (#37264)
bp #36957

Co-authored-by: slothever <18522955+wsjz@users.noreply.github.com>
2024-07-04 20:09:59 +08:00
c7ad1f3d21 [fix](Nereids) simplify window expression should inherit data type (#37061) (#37283)
pick from master #37061

after window expression rewritten by literal.
literal's data type should same with original window expression.
2024-07-04 19:19:05 +08:00
e4fb506c20 [fix](Nereids) null type in result set will be cast to tinyint (#37019) (#37281)
pick from master #37019
2024-07-04 19:18:35 +08:00
ceef9ee123 [feature](serde) support presto compatible output format (#37039) (#37253)
bp #37039
2024-07-04 13:56:05 +08:00
3613413a54 [fix](hive) support find serde info from both tbl properties and serde properties (#37043) (#37188)
bp #37043
2024-07-04 13:55:38 +08:00
bf3ea1839c [test]Mv external p2 test case to p0. (#37070) (#37140)
backport: https://github.com/apache/doris/pull/37070
2024-07-04 11:19:31 +08:00
26be313d40 [mv](nereids) mv cost related PRs (#35652 #35701 #35864 #36368 #36789 #34970) (#37097)
## Proposed changes
pick from #35652 #35701 #35864 #36368 #36789 #34970

Issue Number: close #xxx

<!--Describe your changes.-->
2024-07-04 09:42:11 +08:00
69aebc2d25 [branch-2.1] Picks "[Fix](schema change) Fix can't do reorder column schema change for MOW table and duplicate key table #37067" (#37226)
## Proposed changes

picks https://github.com/apache/doris/pull/37067
2024-07-03 22:42:51 +08:00
97945af947 [fix](merge-on-write) when full clone failed, duplicate key might occur (#37001) (#37229)
cherry-pick #37001
2024-07-03 19:48:10 +08:00
a9f9113c48 [branch-2.1][test](external)move hive cases from p2 to p0 (#37149)
pk (#36855)
test_hive_same_db_table_name
test_hive_special_char_partition
test_complex_types
test_wide_table
2024-07-03 19:44:52 +08:00
e5695e058f [test](migrate) move 2 cases from p2 to p0 (#36935) (#37200)
bp #36935

Co-authored-by: zhangdong <493738387@qq.com>
2024-07-03 17:29:01 +08:00
b3f2bd20e3 [feat](nereids) support explain delete from clause #36782 (#37100)
## Proposed changes
pick from  #36782

support explain like:
explain delete from T where A=1

Issue Number: close #xxx

<!--Describe your changes.-->

(cherry picked from commit dc369cd13096dbb90700f7fbf8f35a9059d9906f)

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->
2024-07-03 15:08:08 +08:00
e857680661 [Migrate-Test](multi-catalog) Migrate p2 tests from p2 to p0. (#37175)
Backport #36989.
2024-07-03 11:08:49 +08:00
4761090848 [fix](tvf) Partition columns in CTAS need to be compatible with the STRING type of external tables/TVF (#37161)
bp: #35489
2024-07-03 10:58:08 +08:00
0aeb768bf9 [Fix](export/outfile) Support compression when exporting data to Parquet / ORC. (#37167)
bp: #36490
2024-07-03 10:53:57 +08:00
6804ae5827 [enhance](mtmv)reduce the behavior of triggering the mtmv state to change to schema_change (#36513) (#37122)
pick from https://github.com/apache/doris/pull/36513
2024-07-03 10:42:03 +08:00
5bb6642b86 [fix](mtmv)mtmv support default key (#36221) (#36601)
pick : https://github.com/apache/doris/pull/36221
2024-07-02 23:08:38 +08:00
65375b48fc [enhance](mtmv)support replace materialized view (#36749) (#37147)
pick: https://github.com/apache/doris/pull/36749
2024-07-02 23:00:55 +08:00
e7e1e967cf [test](migrate) move 2 cases from p2 to p0 for 2.1 (#37139)
pick #37004
2024-07-02 22:50:53 +08:00
b445c783eb [test](tvf) move p2 tvf tests from p2 to p0 (#37081) (#37152)
bp: #37081
2024-07-02 22:38:22 +08:00
74086189d3 [test](tvf) move p2 tvf tests from p2 to p0 (#36871) (#37150)
bp: #36871
2024-07-02 22:37:43 +08:00
bd24a8bdd9 [Fix](csv_reader) Add a session variable to control whether empty rows in CSV files are read as NULL values (#37153)
bp: #36668
2024-07-02 22:12:17 +08:00
c7549acf29 [Fix](Nereids) fix leading with different be instance number (#36613) (#36967)
cherry-pick: #36613

Problem:
When use different be number to test leading explain shape plan,
physical distribute plan would differ due to different be numbers
Solved:
Disable physical distribute node showing in fix leading cases
2024-07-02 19:56:17 +08:00
b63e6ac350 [fix](ES Catalog)Add array types support in esquery function (#36936) (#37054)
backport #36936
2024-07-02 17:48:35 +08:00
cf86eb8647 [test](migrate) move test_hive_text_complex_type from p2 to p0 (#37007) (#37123)
bp: #37007
2024-07-02 17:36:37 +08:00
7443e8fcf2 [cherry-pick](branch-2.1) fix single compaction test p2 #34568 #36881 (#37075) 2024-07-02 15:22:04 +08:00
496024ffb5 [fix](mtmv) mtmv add case and fix bug (#36019) (#36600)
pick from: #36019
2024-07-02 14:24:53 +08:00
c66975b244 [branch-2.1] Pick "[Fix](regression) Fix p0 case test_unique_table_auto_inc_concurrent #37048" (#37050)
## Proposed changes

pick https://github.com/apache/doris/pull/37048
2024-07-02 11:15:50 +08:00
6789f5bc80 [fix](null safe equal join) fix coredump if both sides of the conjunct is not nullable #36263 (#37073) 2024-07-02 11:01:55 +08:00
6f944549d1 [fix](regression)fix case failure (#37058) 2024-07-02 09:55:18 +08:00
6425ce8a89 [Fix](Prepared Statment) use fixed charset to init StringLiteral (#37084)
picked from #36860
2024-07-01 23:11:13 +08:00
72c20d3ccc [branch-2.1](function) fix date_format and from_unixtime core when meet long format string (#35883) (#36158)
pick #35883
2024-07-01 20:35:31 +08:00
14c991f09b [Feature](Prepared Statement) fix and enable enable_server_side_prepared_statement by default #36581 (#36818)
picked from #36581
2024-07-01 14:35:17 +08:00
4210a6a8d6 [branch-2.1] PIck "[Fix](autoinc) Hanlde the processing of auto_increment column on exchange node rather than on TabletWriter when using TABLET_SINK_SHUFFLE_PARTITIONED #36836" (#37029)
## Proposed changes

pick https://github.com/apache/doris/pull/36836
2024-07-01 09:56:30 +08:00
12dddfc26c [branch-2.1] Pick "[Fix](autoinc) try fix concurrent load problem with auto inc column #36421" (#37027)
## Proposed changes

pick https://github.com/apache/doris/pull/36421
2024-06-30 13:10:03 +08:00
d237a4d303 [fix](array)fix array_except/union for left const return only one row result #36776 (#36986) 2024-06-30 12:25:17 +08:00
d0c0a7b9ae [Fix](variant) ignore serialization of nothing type (#37006)
picked from #36997
2024-06-28 18:41:40 +08:00
7c6d280def [Test](manager_interface)append manager interface test. (#35889) (#36912)
bp #35889

---------

Co-authored-by: daidai <2017501503@qq.com>
2024-06-28 18:38:33 +08:00
4dcceaefea [test](ES Catalog) Add test cases for ES 5.x (#34441) (#36993)
backport #34441
2024-06-28 16:58:07 +08:00
557da5b24a [fix](Nereids) processCharacterLiteral even if both side are literal (#36729) (#36921)
pick from master #36729
2024-06-28 11:01:01 +08:00
fcc26cc671 [test](migrate) move some cases from p2 to p0 (#36750)(#36787) (#36922)
bp #36750 and #36787
2024-06-27 20:59:50 +08:00
5c1eef5f06 [feature](tvf) support max_filter_ratio (#35431) (#36911)
bp #35431

Co-authored-by: 苏小刚 <suxiaogang223@icloud.com>
2024-06-27 20:58:53 +08:00
a05d5cc75e [refactor](variant) refactor sub path push down on variant type (#36478) (#36923)
pick from master #36478

intro a new rule VARIANT_SUB_PATH_PRUNING to prune variant sub path.

for example, variant slot v in table t has two sub path: 'c1' and 'c2',
after this rule, select v['c1'] from t will only scan one sub path 'c1'
of v to reduce scan time.

This rule accomplishes all the work using two components. The Collector
traverses from the top down, collecting all the element_at functions on
the variant types, and recording the required path from the original
variant slot to the current element_at. The Replacer traverses from the
bottom up, generating the slots for the required sub path on scan,
union, and cte consumer. Then, it replaces the element_at with the
corresponding slot.
2024-06-27 17:48:43 +08:00
22cb7b8fcb [improvement](compaction) be do not compact invisible version to avoid query error -230 #28082 (#36222)
cherry pick from #28082
2024-06-27 13:45:21 +08:00
a8e9c89dc6 [Fix](nereids) fix NormalizeAgg, change the upper project projections rewrite logic (#36161) (#36622)
cherry-pick #36161 to branch-2.1

NormalizeAggregate rewrite logic has a bug, for sql like this:

SELECT
	CASE
		1 WHEN CAST( NULL AS SIGNED ) THEN NULL
		WHEN COUNT( DISTINCT CAST( NULL AS SIGNED ) ) THEN NULL
		ELSE null
	END ;

This is the plan after NormalizeAggregate, the LogicalAggregate only
output `count(DISTINCT cast(NULL as SIGNED))`#3, do not output cast(NULL
as SIGNED)#2, but the upper project use cast(NULL as SIGNED)#2, so Doris
report error "cast(NULL as SIGNED) not in aggregate's output".

LogicalResultSink[29] ( outputExprs=[__case_when_0#1] ) +--LogicalProject[26] ( distinct=false, projects=[CASE WHEN (1 = cast(NULL as SIGNED)#2) THEN NULL WHEN (1 = count(DISTINCT cast(NULL as SIGNED))#3) THEN NULL ELSE NULL END AS `CASE WHEN (1 = cast(NULL as SIGNED)) THEN NULL WHEN (1 = count(DISTINCT cast(NULL as SIGNED))) THEN NULL ELSE NULL END`#1], excepts=[] )
   +--LogicalAggregate[25] ( groupByExpr=[], outputExpr=[count(DISTINCT cast(NULL as SIGNED)#2) AS `count(DISTINCT cast(NULL as SIGNED))`#3], hasRepeat=false )
      +--LogicalProject[24] ( distinct=false, projects=[cast(NULL as SIGNED) AS `cast(NULL as SIGNED)`#2], excepts=[] )
         +--LogicalOneRowRelation ( projects=[0 AS `0`#0] )

The problem is that the cast(NULL as SIGNED)#2 should not outputted by
LogicalAggregate, cast(NULL as SIGNED) should be computed in
LogicalProject.
This pr change the upper project projections rewrite logic:
aggregateOutputs is rewritten and become the upper-level LogicalProject
projections. During the rewriting process, the expressions inside the
agg function can be rewritten with expressions in aggregate function
arguments and group by expressions, but the ones outside the agg
function can only be rewritten with group by expressions.

---------

Co-authored-by: moailing <moailing@selectdb.com>
2024-06-27 12:17:18 +08:00
a6a84b8ecc [improvement](stream load)(cherry-pick) support hll_from_base64 for stream load column mapping (#36819)
picked from https://github.com/apache/doris/pull/35923
2024-06-26 20:12:40 +08:00
25fb30c723 [fix](intersect) fix coredump caused by intersect of nullable and not nullable children #36401 (#36441)
## Proposed changes

Pick #36765
2024-06-26 17:45:21 +08:00
6ec9a731e8 [branch-2.1](cherry-pick) partial update should not read old fileds from rows with delete sign (#36210) (#36755)
cherry-pick #36210
2024-06-24 21:13:24 +08:00
90a4dd09f3 [Fix](func) CoreDump and Result Error in percentile function (#36647)
cherry pick #36643
2024-06-21 23:42:45 +08:00