barrkel commented on code in PR #3741:
URL: https://github.com/apache/calcite/pull/3741#discussion_r1544657539
##########
core/src/main/java/org/apache/calcite/sql/SqlOperator.java:
##########
@@ -539,8 +539,10 @@ public RelDataType inferReturnType(
}
// MEASURE wrapper should be removed, e.g. MEASURE<DOUBLE> should just
be DOUBLE
- if (isMeasure(returnType) && returnType.getMeasureElementType() != null)
{
- returnType =
Objects.requireNonNull(returnType.getMeasureElementType());
+ if (opBinding.getOperator().kind != SqlKind.AS
+ && isMeasure(returnType)
+ && returnType.getMeasureElementType() != null) {
+ returnType = returnType.getMeasureElementType();
Review Comment:
It's related to the change you asked me to make on your code, removing the
not-null assertion.
--
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]