asolimando commented on a change in pull request #2296:
URL: https://github.com/apache/calcite/pull/2296#discussion_r543378465
##########
File path:
core/src/main/java/org/apache/calcite/sql2rel/StandardConvertletTable.java
##########
@@ -837,6 +841,44 @@ private static RexNode makeConstructorCall(
return rexBuilder.makeNewInvocation(type, defaultCasts);
}
+ private RexNode convertItem(
+ @UnknownInitialization StandardConvertletTable this,
+ SqlRexContext cx,
+ SqlCall call) {
+ assert call.operandCount() == 2;
Review comment:
It's the parser which prevents multiple operands for ITEM, it expects a
single expression/operand between the brackets
([Parser.jj#L3576](https://github.com/apache/calcite/blob/0ab1fe3118cc5adb8750a5c785e24fa4381afda1/core/src/main/codegen/templates/Parser.jj#L3576
))
The preceding phases, type checking
([SqlItemOperator.java#L89](https://github.com/apache/calcite/blob/0ab1fe3118cc5adb8750a5c785e24fa4381afda1/core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java#L89))
for operands and return type inference
([SqlItemOperator.java#L144](https://github.com/apache/calcite/blob/0ab1fe3118cc5adb8750a5c785e24fa4381afda1/core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java#L144))
for ITEM, already rely on having a single operand (in addition to the implicit
one).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]