snuyanzin commented on code in PR #4388:
URL: https://github.com/apache/calcite/pull/4388#discussion_r2097272942
##########
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:
in case of Flink it depends... It might be defined per query however then
there is extra requirement of having primary key which is checked during
planning.
It seems the behavior might be depending on downstream projects.
Then I'm thinking of having a `protected` method here which is failing by
default in case of queries and downstream projects could override it if needed
--
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]