rusackas commented on code in PR #45771:
URL: https://github.com/apache/superset/pull/45771#discussion_r4401705499


##########
tests/unit_tests/sql/parse_tests.py:
##########
@@ -2884,8 +2884,18 @@ def test_firebolt_old_escape_string() -> None:
         ("SELECT * FROM t WHERE ROWNUM <= 9 AND x = 1 AND ROWNUM < 4", 
"oracle", 3),
         ("SELECT * FROM t WHERE ROWNUM < 0", "oracle", 0),
         ("SELECT * FROM (SELECT * FROM t) WHERE ROWNUM <= 11", "oracle", 11),
+        # A nested `AND` grouped in parentheses still bounds the result, no
+        # matter which side of the chain it is on.
+        ("SELECT * FROM t WHERE x = 1 AND (y = 2 AND ROWNUM <= 5)", "oracle", 
5),

Review Comment:
   Good call @sadpandajoe. Added nested cases (`x = 1 AND (y = 2 AND ROWNUM <= 
5)` and the left-grouped form) to `test_cap_limit_value_oracle_rownum`, so the 
`format()` equality check now proves no extra wrapper is stacked.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to