rusackas opened a new pull request, #40142:
URL: https://github.com/apache/superset/pull/40142
### SUMMARY
This is a **test-only PR** opened as a TDD-style validation of issue #32028.
#32028 (filed 2025-01) reports that dashboards built on a
TimescaleDB-extended Postgres database fail with \`sqlglot.errors.ParseError:
The number of provided arguments (2) is greater than the maximum number of
supported arguments (1)\` for queries using TimescaleDB hyperfunctions like
\`last(value, time)\`, \`first(value, time)\`, or \`time_bucket(...)\`. SQL Lab
works because it bypasses the parser; the dashboard path goes through
\`SQLScript\` and trips the strict arity check.
This PR adds a parameterized regression test on \`SQLScript\` covering three
representative TimescaleDB hyperfunctions:
- \`last(value, time_col)\`
- \`first(value, time_col)\`
- \`time_bucket('1 hour', time_col)\`
### How to interpret CI
- **CI green** → the sqlglot version Superset is pinned to now tolerates
these hyperfunctions; merging closes #32028 and locks in the regression guard
so a future sqlglot bump that re-tightens arity checks fails CI immediately.
- **CI red** → bug is still live for at least one of the three signatures.
Likely fix: register a Postgres-dialect overlay in \`superset/sql/parse.py\`
that whitelists these (and similar) TimescaleDB hyperfunctions, or pin sqlglot
to a version that tolerates them.
### TESTING INSTRUCTIONS
\`\`\`bash
pytest
tests/unit_tests/sql/parse_tests.py::test_postgres_parses_timescaledb_hyperfunctions
-v
\`\`\`
### ADDITIONAL INFORMATION
- [ ] Has associated issue: closes #32028
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] 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]