[coverage] Conformance findings: DATATYPE-042

Đang mở
#902 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python, sql
Lĩnh vực
database

Hướng nghiên cứu

Bắt đầu với coverage PR diff trong tests/ và test bị lỗi có tên test_untyped_null_column_reports_string_type, sau đó theo dõi cách cursor.description suy ra các kiểu schema cho kết quả có dữ liệu và kết quả rỗng. Xác minh rằng cả SELECT NULL và CAST(NULL AS STRING) đều báo cáo cùng kiểu STRING trong cả hai luồng, đồng thời giữ nguyên các assertion đã nêu về hàng, cột, tên và giá trị null.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
233
Fork
152
Merge trung bình
21 giờ 5 phút
Pull request đã merge (30 ngày)
10

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của databricks/databricks-sql-python

Tất cả issue của databricks/databricks-sql-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.