ByteYue opened a new pull request, #25021:
URL: https://github.com/apache/doris/pull/25021
## Proposed changes
Issue Number: close #xxx
The former check of partition's policy and table's policy is totally wrong,
cause it would change the global variable `storagePolicy` which might make the
latter partitions' setting been covered by the former policy.
For example, if you type this ddl to doris
```sql
CREATE TABLE IF NOT EXISTS test_table3 (
L_ORDERKEY INTEGER NOT NULL
)
DUPLICATE KEY(L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_LINENUMBER)
PARTITION BY RANGE(`L_SHIPDATE`)
(
PARTITION `p202301` VALUES LESS THAN ("1995-12-01")
("storage_policy" = "test_add_drop_partition_policy"),
PARTITION `p202302` VALUES LESS THAN ("2017-03-01")
)
DISTRIBUTED BY HASH(L_ORDERKEY) BUCKETS 3
PROPERTIES (
"replication_num" = "1"
)
```
Then you'll surprisingly find that the partition `p202302` has storage
policy.
<!--Describe your changes.-->
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
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]