barrkel commented on code in PR #3741:
URL: https://github.com/apache/calcite/pull/3741#discussion_r1544290730


##########
core/src/main/java/org/apache/calcite/sql/SqlOperator.java:
##########
@@ -539,7 +539,9 @@ public RelDataType inferReturnType(
       }
 
       // MEASURE wrapper should be removed, e.g. MEASURE<DOUBLE> should just 
be DOUBLE
-      if (isMeasure(returnType) && returnType.getMeasureElementType() != null) 
{
+      if (opBinding.getOperator().kind != SqlKind.AS
+          && isMeasure(returnType)
+          && returnType.getMeasureElementType() != null) {
         returnType = 
Objects.requireNonNull(returnType.getMeasureElementType());

Review Comment:
   This your code! I'll remove the `requireNotNull` though.



-- 
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]

Reply via email to