julianhyde commented on code in PR #2965:
URL: https://github.com/apache/calcite/pull/2965#discussion_r1020820936
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java:
##########
@@ -1287,6 +1287,20 @@ private static FlatAggregate flattenRecurse(@Nullable
SqlCall filterCall,
}
}
+ /** Returns whether a select item is a measure. */
+ public static boolean isMeasure(SqlNode selectItem) {
+ return getMeasure(selectItem) != null;
+ }
+
+ /** Returns the measure expression if a select item is a measure, null
+ * otherwise.
+ *
+ * <p>For a measure, {@code selectItem} will have the form
+ * {@code AS(MEASURE(exp), alias)} and this method returns {@code exp}. */
+ public static @Nullable SqlNode getMeasure(SqlNode selectItem) {
+ return null;
Review Comment:
Yes, it will be extended in
[CALCITE-4496](https://issues.apache.org/jira/browse/CALCITE-4496). I added a
note.
--
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]