beyond1920 commented on a change in pull request #2524:
URL: https://github.com/apache/calcite/pull/2524#discussion_r716130095
##########
File path: core/src/main/java/org/apache/calcite/sql/SqlWindowTableFunction.java
##########
@@ -244,5 +253,53 @@ void validateColumnNames(SqlValidator validator,
}
});
}
+
+ /**
+ * Checks whether input table satisfy requirement of input semantics.
+ * Based on SQL standard 2016 Polymorphic Table Functions:
+ * the input with row semantics may not be partitioned.
+ * the input with set semantics may be partitioned on one or more columns.
+ *
+ * @param callBinding The call binding
+ * @return true if validation passes
+ */
+ boolean checkInputTableSemantic(SqlCallBinding callBinding) {
+ boolean isValid;
Review comment:
Hi, Danny, I add this restrict because PTF SQL standard.
Only input tables with set semantics may be partitioned on columns while
input table with row semantics may not be partitioned or ordered.

Based on this rule, tumbling window and Hop window function could not be
with partition by because their input table has row semantics.
--
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]