test(sql-parser): pin TimescaleDB hyperfunctions parse on postgresql (#32028)#40142
Conversation
Closes #32028 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review Agent Run #83bfbbActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40142 +/- ##
=======================================
Coverage 64.17% 64.17%
=======================================
Files 2590 2590
Lines 138087 138087
Branches 32039 32039
=======================================
Hits 88615 88615
Misses 47947 47947
Partials 1525 1525
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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:
How to interpret CI
TESTING INSTRUCTIONS
```bash
pytest tests/unit_tests/sql/parse_tests.py::test_postgres_parses_timescaledb_hyperfunctions -v
```
ADDITIONAL INFORMATION
🤖 Generated with Claude Code