validation: two tests fail on sqlglot 30.19.0, the declared minimum

Open Beginner friendly
#767 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, testing

Research direction

Start with the sqlglot version declaration in validation/validate.py and the two tests added in #647 under validation/tests/. Reproduce the failures with sqlglot 30.19.0, then check the suite with the proposed minimum of 30.29.0. Done when the declared minimum covers both tests and the validation test suite passes at that version.

Written by the indexing model from the issue text.

Description

needs-triage

validation/validate.py declares sqlglot>=30.19.0. On that version two of the tests added in #647 fail on main (74a26be):

uv run --no-project --with pytest --with pyyaml --with jsonschema --with "sqlglot==30.19.0" -m pytest validation/tests/
FAILED test_rejects_a_dialect_sql_statement_used_as_an_expression[snowflake-list]
FAILED test_accepts_keyword_column_expressions_in_dialect[desc-dot-bigquery]
2 failed, 748 passed, 1 skipped
  • snowflake-list expects LIST @stage to be rejected as a LIST STAGE statement. sqlglot up to 30.21.0 parses it as an aliased expression, so the validator returns no error. From 30.22.0 it parses as ListStage and the test passes.
  • desc-dot-bigquery expects desc.x to be accepted in BigQuery. Up to 30.27.0 the validator returns "Invalid expression / Unexpected token. Line 1, Col: 11." From 30.29.0 it accepts it.

I ran the suite on 30.19.0, 30.20.0, 30.21.0, 30.22.0, 30.25.0, 30.26.0, 30.27.0, 30.29.0, 30.30.0 and 30.33.0 (there is no 30.28.0). The first three fail both tests, the next four fail desc-dot-bigquery and the last three give 750 passed, 1 skipped. CI installs the latest sqlglot, so it does not run into this.

I can open a PR that raises the declared minimum to sqlglot>=30.29.0.

Dominant language
Python
Stars
2.7k
Forks
353
Avg merge
3d 19h
Merged PRs (30d)
86

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/ossie

All issues in apache/ossie

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.