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

未关闭 适合新手
#767 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
backend, testing

调研方向

从 validation/validate.py 中 sqlglot 的版本声明,以及 #647 在 validation/tests/ 下新增的两个测试开始。使用 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 小时
30 天内合并 PR
86

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/ossie 的其他 Issue

查看 apache/ossie 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。