github-actions[bot] commented on code in PR #62535:
URL: https://github.com/apache/doris/pull/62535#discussion_r3091857061
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/MTMVPartitionDefinition.java:
##########
@@ -190,6 +197,18 @@ private static Pair<Integer, Expr>
convertToLegacyRecursion(Expression expressio
}
Review Comment:
This only fixes the later Nereids-to-legacy conversion step.
`analyzeAndTransferToMTMVPartitionInfo()` still sets `partitionColName` only
when `date_trunc`'s first argument is an `UnboundSlot`, so the direct form
promised by the PR, `PARTITION BY (date_trunc(date_add/sub(col, INTERVAL N
HOUR), 'unit'))`, still falls through with `partitionColName == null`, and
`fillPctInfos()` then fails with `partition column can not find from sql select
column`. The new regression tests avoid this by using the alias form
(`date_trunc(day_alias, 'day')`).
The same shape is reparsed from persisted metadata in
`MTMVPlanUtil.analyzeQueryWithSql()`, so even alias-based MVs can fail
`ensureMTMVQueryUsable()` in the `SCHEMA_CHANGE` path once the stored expr is
round-tripped back through this method.
--
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]