kgyrtkirk commented on code in PR #3859:
URL: https://github.com/apache/calcite/pull/3859#discussion_r1686774874


##########
core/src/main/resources/org/apache/calcite/runtime/CalciteResource.properties:
##########
@@ -359,4 +359,5 @@ NoOperator=No operator for ''{0}'' with kind: ''{1}'', 
syntax: ''{2}'' during JS
 MustFilterFieldsMissing=SQL statement did not contain filters on the following 
fields: {0}
 IllegalNegativeBitGetPosition=BIT_GET/GETBIT error: negative position 
{0,number} not allowed
 IllegalBitGetPositionExceedsLimit=BIT_GET/GETBIT error: position {0,number} 
exceeds the bit upper limit {1,number}
+HavingMayNotContainWindow=Window expressions are not allowed in HAVING

Review Comment:
   great idea! I've changed it to:
   ```
   Window expressions are not permitted in the HAVING clause; use the QUALIFY 
clause instead.
   ```



##########
core/src/main/resources/org/apache/calcite/runtime/CalciteResource.properties:
##########
@@ -359,4 +359,5 @@ NoOperator=No operator for ''{0}'' with kind: ''{1}'', 
syntax: ''{2}'' during JS
 MustFilterFieldsMissing=SQL statement did not contain filters on the following 
fields: {0}
 IllegalNegativeBitGetPosition=BIT_GET/GETBIT error: negative position 
{0,number} not allowed
 IllegalBitGetPositionExceedsLimit=BIT_GET/GETBIT error: position {0,number} 
exceeds the bit upper limit {1,number}
+HavingMayNotContainWindow=Window expressions are not allowed in HAVING

Review Comment:
   I really tried to come up with a good name for it - earlier ones were even 
worse :)
   thank you for the suggestion...renamed it to `WindowInHavingNotAllowed` :)



##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -6603,6 +6608,11 @@ void testGroupExpressionEquivalenceParams() {
     // OVER in clause
     sql("select ^sum(max(empno) OVER (order by deptno ROWS 2 PRECEDING))^ from 
emp")
         .fails(ERR_NESTED_AGG);
+
+    // OVER in HAVING

Review Comment:
   moved all related tests to a separate testmethod and referenced the jira :)



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