suxiaogang223 commented on code in PR #65868:
URL: https://github.com/apache/doris/pull/65868#discussion_r3675319292
##########
fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPartitionUtil.java:
##########
@@ -361,13 +362,40 @@ public static boolean
isSyncWithPartitions(MTMVRefreshContext context, String mt
public static String generatePartitionName(PartitionKeyDesc desc) {
Matcher matcher = PARTITION_NAME_PATTERN.matcher(desc.toSql());
String partitionName = PARTITION_NAME_PREFIX +
matcher.replaceAll("").replaceAll("\\,", "_");
+ // The legacy readable name removes SQL quotes. Without this marker, a
typed NULL and
+ // the string literal "NULL" both become p_NULL even though they are
distinct list
+ // partition values. Preserve the existing NULL partition name and
disambiguate only
+ // the literal value.
+ if (containsLiteralNull(desc)) {
Review Comment:
Fixed in d3197e7866. MTMV now derives a stable SHA-256 suffix from the
complete typed PartitionKeyDesc SQL whenever the readable encoding is ambiguous
(including literal NULL) or too long. The unit test covers typed NULL, literal
, and the legal value that collided with the previous suffix.
--
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]