[fix](load) Skip MAXVALUE in list partition sink in-keys - #66518
Open
englefly wants to merge 1 commit into
Open
Conversation
Issue Number: None Related PR: None Problem Summary: Executing an INSERT into a table whose LIST partitions contain MAXVALUE (e.g. `PARTITION p4 VALUES IN ((NULL, MAXVALUE))`) fails on the FE with `TProtocolException: Required field 'node_type' was not present!` while serializing the plan fragments to the BE. Root cause: OlapTableSink.setPartitionKeys converts every partition key literal of a LIST partition into TOlapTablePartition.in_keys, but the MAXVALUE literal (MaxLiteral.MAX_VALUE) has no thrift conversion (ExprToThriftVisitor.visitMaxLiteral is an empty stub), so the produced TExprNode has no node_type, which is a required thrift field. The RANGE branch already skips max-value endpoints (`!range.upperEndpoint().isMaxValue()`), while the LIST branch has no such guard. Fix: skip in-key tuples that contain MAXVALUE at any position when building the sink partition param, mirroring the RANGE branch's skip logic. None - Test: Regression test (test_auto_list_partition_null extended with INSERT into a table containing MAXVALUE LIST partitions) passed - Behavior changed: No - Does this need documentation: No [fix](fe) Do not prune list partitions containing MAXVALUE Issue Number: None Related PR: None Problem Summary: Querying a table whose LIST partitions contain MAXVALUE (e.g. `PARTITION p4 VALUES IN ((NULL, MAXVALUE))`) with a predicate on the partition columns fails with "Can not get value from max literal". The Nereids partition pruner converts every partition key literal into a concrete literal (OneListPartitionEvaluator.getInputsByOneSlot/getInputsByMultiSlots) and evaluates the predicate against it, but MaxLiteral has no value, so evaluation throws. Fix: a partition whose keys contain MAXVALUE cannot be evaluated against the predicate, so it is kept conservatively and the predicate is not pruned, mirroring the existing default-partition handling in canBePrunedOut. None - Test: Regression test (test_auto_list_partition_null extended with a predicate query on the partition columns) passed - Behavior changed: No - Does this need documentation: No
englefly
requested review from
924060929,
morrySnow and
starocean999
as code owners
August 6, 2026 02:50
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
Author
|
/review |
Contributor
|
Codex automated review failed and did not complete. Error: All Codex review accounts are usage-limited; earliest retry is 2026-08-08T03:32:00Z. Please trigger /review again after that time. |
Contributor
FE Regression Coverage ReportIncrement line coverage |
Contributor
Author
|
run performance |
Contributor
TPC-H: Total hot run time: 28869 ms |
Contributor
TPC-DS: Total hot run time: 157877 ms |
Contributor
ClickBench: Total hot run time: 23.73 s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Number: None
Related PR: None
Problem Summary: Executing an INSERT into a table whose LIST partitions contain MAXVALUE (e.g.
PARTITION p4 VALUES IN ((NULL, MAXVALUE))) fails on the FE withTProtocolException: Required field 'node_type' was not present!while serializing the plan fragments to the BE. Root cause: OlapTableSink.setPartitionKeys converts every partition key literal of a LIST partition into TOlapTablePartition.in_keys, but the MAXVALUE literal (MaxLiteral.MAX_VALUE) has no thrift conversion (ExprToThriftVisitor.visitMaxLiteral is an empty stub), so the produced TExprNode has no node_type, which is a required thrift field. The RANGE branch already skips max-value endpoints (!range.upperEndpoint().isMaxValue()), while the LIST branch has no such guard. Fix: skip in-key tuples that contain MAXVALUE at any position when building the sink partition param, mirroring the RANGE branch's skip logic.None
fix Do not prune list partitions containing MAXVALUE
Issue Number: None
Related PR: None
Problem Summary: Querying a table whose LIST partitions contain MAXVALUE (e.g.
PARTITION p4 VALUES IN ((NULL, MAXVALUE))) with a predicate on the partition columns fails with "Can not get value from max literal". The Nereids partition pruner converts every partition key literal into a concrete literal (OneListPartitionEvaluator.getInputsByOneSlot/getInputsByMultiSlots) and evaluates the predicate against it, but MaxLiteral has no value, so evaluation throws. Fix: a partition whose keys contain MAXVALUE cannot be evaluated against the predicate, so it is kept conservatively and the predicate is not pruned, mirroring the existing default-partition handling in canBePrunedOut.None
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)