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

Aperta Adatta ai principianti
#767 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend, testing

Direzione di ricerca

Inizia dalla dichiarazione della versione di sqlglot in validation/validate.py e dai due test aggiunti in #647 sotto validation/tests/. Riproduci gli errori con sqlglot 30.19.0, poi verifica la suite con la versione minima proposta, 30.29.0. Il lavoro è completo quando la versione minima dichiarata copre entrambi i test e la suite di test di validazione passa con quella versione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
2.7k
Fork
353
Merge medio
3g 19h
PR unite (30g)
86

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/ossie

Tutte le issue di apache/ossie

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.