[coverage] Conformance findings: DATATYPE-042

オープン
#902 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python, sql
領域
database

調査の方向性

tests/ 配下のカバレッジ PR diff と、test_untyped_null_column_reports_string_type という名前の失敗しているテストから始め、次に cursor.description がデータのある結果と空の結果のスキーマ型をどのように導出するかを追跡します。SELECT NULL と CAST(NULL AS STRING) の両方が、どちらの経路でも同じ STRING 型を報告することを確認し、その際に指定された行、列、名前、NULL 値に関するアサーションを維持します。

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

説明

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-python. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-python) is fixed, then flips green as a tripwire.

Findings

  • DATATYPE-042 [sea]: Over the Rust kernel (SEA), an untyped NULL column (SELECT NULL, SQL VOID) reports cursor.description type_code 'null' instead of the connector's STRING type, while its CAST(NULL AS STRING) sibling in the same result set reports 'string' — self-inconsistent and divergent from the Thrift path; affects both the live-data and empty-result schema paths
    • failing test: test_untyped_null_column_reports_string_type (see the coverage PR diff under tests/)
  • DATATYPE-042: Over the Rust kernel (SEA), an untyped NULL column (SELECT NULL, SQL VOID) passes the wire type through and reports cursor.description type_code 'null' instead of the connector's STRING type, while a CAST(NULL AS STRING) sibling in the same result set reports 'string' — self-inconsistent, and divergent from the Thrift path which reports 'string'; affects both the live-data (Arrow-batch-derived) and empty-result (manifest-derived) schema paths

Reproduce & Expected

DATATYPE-042 — Verify that an UNTYPED NULL column -- SELECT NULL (SQL type VOID) -- reports the driver's STRING type on the result-set schema, identically to a CAST(NULL AS STRING) sibling selected by the SAME…

Reproduce:

SELECT NULL AS untyped_null, CAST(NULL AS STRING) AS typed_null_string
SELECT NULL AS untyped_null, CAST(NULL AS STRING) AS typed_null_string
FROM range(1) WHERE 1 = 0

Expected (per the shared spec):

  • result has exactly 1 row(s)
  • result has 2 column(s)
  • col 0 is named untyped_null
  • col 1 is named typed_null_string
  • col untyped_null, row 0 is null
  • col typed_null_string, row 0 is null
  • result has exactly 0 row(s)
  • result has 2 column(s)
  • col 0 is named untyped_null
  • col 1 is named typed_null_string
  • full assertion contract:
result:
- label: live_row
  row_count: 1
- label: live_row
  column_count: 2
- label: live_row
  column:
    index: 0
    name: untyped_null
- label: live_row
  column:
    index: 1
    name: typed_null_string
- label: live_row
  column:
    name: untyped_null
    is_null: true
- label: live_row
  column:
    name: typed_null_string
    is_null: true
- label: live_row
  untyped_null_reports_string_type:
    columns:
    - untyped_null
    - typed_null_string
    match_each_other: true
- label: empty_result
  row_count: 0
- label: empty_result
  column_count: 2
- label: empty_result
  column:
    index: 0
    name: untyped_null
- label: empty_result
  column:
    index: 1
    name: typed_null_string
- label: empty_result
  untyped_null_reports_string_type:
    columns:
    - untyped_null
    - typed_null_string
    match_each_other: true

Context

主要言語
Python
スター
233
フォーク
152
平均マージ
21時間 5分
マージ済み PR(30日)
10

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

databricks/databricks-sql-python のほかの issue

databricks/databricks-sql-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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