mihaibudiu commented on code in PR #5414:
URL: https://github.com/apache/calcite/pull/5414#discussion_r4566758696
##########
testkit/src/main/java/org/apache/calcite/test/MockSqlOperatorTable.java:
##########
@@ -533,6 +534,26 @@ public MyFunction() {
}
}
+ /** A scalar function that takes a single DESCRIPTOR argument. Unlike the
+ * window table functions, it does not validate the column names itself; it
+ * relies on {@code DESCRIPTOR} enforcing that each argument is an
+ * identifier. */
+ public static class DescriptorConsumerFunction extends SqlFunction {
Review Comment:
where is this used?
##########
core/src/main/java/org/apache/calcite/sql/SqlDescriptorOperator.java:
##########
@@ -47,19 +47,26 @@ public SqlDescriptorOperator() {
@Override public RelDataType deriveType(
SqlValidator validator,
SqlValidatorScope scope, SqlCall call) {
+ // A DESCRIPTOR is a list of column names, so every operand must be an
+ // identifier. deriveType does not call validateOperands (the operands are
+ // names interpreted by the enclosing function, not expressions to be
typed),
Review Comment:
no reason to document what other parts of the code do.
describe what this code does
--
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]