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

オープン 初心者向け
#767 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend, testing

調査の方向性

validation/validate.py の sqlglot バージョン宣言と、#647 で validation/tests/ に追加された2つのテストから始めてください。sqlglot 30.19.0 で失敗を再現し、次に提案された最小バージョン 30.29.0 でテストスイートを確認してください。宣言された最小バージョンが両方のテストをカバーし、そのバージョンで検証テストスイートが通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
2.7k
フォーク
353
平均マージ
3日 19時間
マージ済み PR(30日)
86

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/ossie のほかの issue

apache/ossie の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。