aminghadersohi commented on code in PR #44708:
URL: https://github.com/apache/superset/pull/44708#discussion_r4140737871
##########
tests/unit_tests/sql/dialects/db2_tests.py:
##########
@@ -244,3 +244,22 @@ def test_column_plus_literal_duration() -> None:
# Should parse as (col + 1 DAYS), not (col + 1) AS DAYS
assert regenerated == "SELECT col + 1 DAYS FROM t"
+
+
[email protected](
+ ("sql", "expected"),
+ [
+ ("SELECT * FROM t LIMIT 10 OFFSET 2", "SELECT * FROM t LIMIT 10 OFFSET
2"),
+ (
+ "SELECT * FROM (SELECT 1 AS a FROM t) AS x LIMIT 5",
+ "SELECT * FROM (SELECT 1 AS a FROM t) AS x LIMIT 5",
+ ),
+ ("SELECT a % 3 FROM t LIMIT 4", "SELECT a % 3 FROM t LIMIT 4"),
Review Comment:
Good catch, thanks. Added `("SELECT * FROM t LIMIT 10 %", "SELECT * FROM t
LIMIT 10 PERCENT")` in 1d6f2bf. With `parse_mod=parse_mod` removed from
`_parse_term` that case fails (1 failed, 28 passed); with it, all 29 pass. I
kept the select-list `a % 3` case since it still guards modulo parsing inside
the override.
--
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]