rusackas opened a new pull request, #41836:
URL: https://github.com/apache/superset/pull/41836

   ### SUMMARY
   
   Test-only PR — no production code changes.
   
   Issue #37285 reported that ClickHouse parametric aggregate functions (a 
double pair of parentheses, e.g. `groupConcat(', ')(part_name)`) could not run 
in SQL Lab: the parser choked on the second argument list, so either a mangled 
query was sent to the database or, with "Allow DDL and DML" unchecked, the 
query was rejected because it "could not be parsed to confirm it is a read-only 
query".
   
   This was fixed upstream by the sqlglot bump to >=30 (the upgrade 
@betodealmeida anticipated in the issue thread has since landed — the pinned 
sqlglot 30.8.0 parses parametric aggregates correctly). This PR adds a 
regression test pinning the reporter's verbatim query on both ClickHouse engine 
specs (`clickhouse`, `clickhousedb`), asserting that `SQLScript` parses it 
without raising and classifies it as read-only (`has_mutation()` is `False`). 
The test passes on current master, proving the issue is resolved and guarding 
against a future dialect-specific regression.
   
   closes #37285
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — test-only change.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   pytest tests/unit_tests/sql/parse_tests.py -k clickhouse_parametric -x -q
   ```
   
   Both parametrized cases pass.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: closes #37285
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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