englefly opened a new pull request, #67028:
URL: https://github.com/apache/doris/pull/67028

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #66518
   
   Problem Summary: PR #66518 made loading and pruning tolerate LIST partitions 
that contain MAXVALUE (created by older versions, e.g. `PARTITION p4 VALUES IN 
((NULL, MAXVALUE))`), because MAXVALUE has no concrete value and breaks thrift 
serialization and predicate evaluation. Creating such a partition is still 
allowed by DDL, which keeps producing tables that cannot be loaded nor pruned. 
This change forbids using MAXVALUE when creating LIST partitions: CREATE TABLE 
and ALTER TABLE ADD PARTITION now fail at analysis time with an informative 
error that names the partition, the offending values, and the RANGE-only usage 
of MAXVALUE; the legacy SinglePartitionDesc path (reached e.g. by the INSERT 
OVERWRITE temp-partition swap on legacy tables) is guarded the same way so no 
new MAXVALUE LIST partition can be created through any path. RANGE partitions 
keep supporting MAXVALUE in 'VALUES LESS THAN (MAXVALUE)'. NULL remains a valid 
LIST partition value; MINVALUE is not a SQL keyword, so MAX
 VALUE is the only special partition value that needed to be rejected for LIST 
partitions. A debug point (FE.skipCheckMaxValueInListPartition) lets tests 
simulate legacy metadata that contains MAXVALUE LIST partitions.
   
   ### Release note
   
   Creating a LIST partition with MAXVALUE now fails with "MAXVALUE is not 
allowed in LIST partition ..." instead of succeeding and producing an unusable 
table; RANGE partitions are unaffected.
   
   ### Check List (For Author)
   
   - Test: FE unit tests passed (CreateTableCommandTest, CreateTableInfoTest, 
ListPartitionInfoTest, PruneOlapScanPartitionTest); regression test 
test_auto_list_partition_null passed on a running cluster; docker regression 
test test_list_partition_maxvalue added for the legacy-table load/prune 
scenario (exercised the debug-point bypass manually against a live FE).
   - Behavior changed: Yes (new DDL-time rejection)
   - Does this need documentation: No
   
   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to