julianhyde commented on code in PR #3738:
URL: https://github.com/apache/calcite/pull/3738#discussion_r1533074815
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java:
##########
@@ -912,15 +912,39 @@ interface Config {
*/
Config withLenientOperatorLookup(boolean lenient);
- /** Returns whether the validator allows measures to be used without the
- * AGGREGATE function. Default is true. */
- @Value.Default default boolean nakedMeasures() {
+ /** Returns whether the validator allows measures to be used without
+ * AGGREGATE function outside an aggregating query. Default is true.
+ */
Review Comment:
move `*/` to end of previous line, to be consistent with formatting in this
file
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java:
##########
@@ -912,15 +912,39 @@ interface Config {
*/
Config withLenientOperatorLookup(boolean lenient);
- /** Returns whether the validator allows measures to be used without the
- * AGGREGATE function. Default is true. */
- @Value.Default default boolean nakedMeasures() {
+ /** Returns whether the validator allows measures to be used without
+ * AGGREGATE function outside an aggregating query. Default is true.
+ */
+ @Value.Default default boolean nakedMeasuresOutsideAggregatingQuery() {
return true;
}
+ /** Sets whether the validator allows measures to be used without AGGREGATE
+ * function outside an aggregating query.
+ */
+ Config withNakedMeasuresOutsideAggregatingQuery(boolean value);
+
+ /** Returns whether the validator allows measures to be used without
+ * AGGREGATE function inside an aggregating query. Default is true.
+ */
+ @Value.Default default boolean nakedMeasuresInsideAggregatingQuery() {
+ return true;
+ }
+
+ /** Sets whether the validator allows measures to be used without AGGREGATE
+ * function inside an aggregating query.
+ */
+ Config withNakedMeasuresInsideAggregatingQuery(boolean value);
+
/** Sets whether the validator allows measures to be used without the
- * AGGREGATE function. */
- Config withNakedMeasures(boolean nakedMeasures);
+ * AGGREGATE function inside or outside aggregate queries.
+ * Deprecated: use the inside / outside variants instead.
+ */
+ @Deprecated
+ default Config withNakedMeasures(boolean nakedMeasures) {
Review Comment:
Set a release for removal. I suggest `// to be removed before 1.38`.
Measures are an experimental feature, so one minor release notice is sufficient.
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java:
##########
@@ -912,15 +912,39 @@ interface Config {
*/
Config withLenientOperatorLookup(boolean lenient);
- /** Returns whether the validator allows measures to be used without the
- * AGGREGATE function. Default is true. */
- @Value.Default default boolean nakedMeasures() {
+ /** Returns whether the validator allows measures to be used without
+ * AGGREGATE function outside an aggregating query. Default is true.
+ */
+ @Value.Default default boolean nakedMeasuresOutsideAggregatingQuery() {
return true;
}
+ /** Sets whether the validator allows measures to be used without AGGREGATE
+ * function outside an aggregating query.
Review Comment:
Also, we seem to use the term 'aggregate query' more than 'aggregating
query' these days.
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java:
##########
@@ -912,15 +912,39 @@ interface Config {
*/
Config withLenientOperatorLookup(boolean lenient);
- /** Returns whether the validator allows measures to be used without the
- * AGGREGATE function. Default is true. */
- @Value.Default default boolean nakedMeasures() {
+ /** Returns whether the validator allows measures to be used without
+ * AGGREGATE function outside an aggregating query. Default is true.
+ */
+ @Value.Default default boolean nakedMeasuresOutsideAggregatingQuery() {
return true;
}
+ /** Sets whether the validator allows measures to be used without AGGREGATE
+ * function outside an aggregating query.
Review Comment:
I think 'in a non-aggregate query' would be clearer than 'outside an
aggregating query' (assuming I understand you correctly).
--
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]