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


##########
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:
   Might need to add it back. Seems like it's messing something up.



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