snuyanzin commented on code in PR #4388:
URL: https://github.com/apache/calcite/pull/4388#discussion_r2094588326
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -5874,6 +5874,11 @@ private void validateSnapshot(
throw newValidationError(period,
Static.RESOURCE.illegalExpressionForTemporal(dataType.getSqlTypeName().getName()));
}
+ if (ns instanceof IdentifierNamespace && ns.resolve() instanceof
WithItemNamespace) {
+ // If the snapshot is used over a CTE, then we don't have a concrete
underlying
+ // table to operate on. This will be rechecked later in the planner
rules.
Review Comment:
i think in general you are right
I backported it from Flink where it is guaranteed...
Any proposal how to proceed with Calcite would be great to hear
--
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]