[coverage] Conformance findings: DATATYPE-042

Đang mở
#496 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
sql, typescript
Lĩnh vực
api, backend, databases

Hướng nghiên cứu

Bắt đầu với expected-failure test DATATYPE-042 trong coverage PR tại tests/, sau đó so sánh hành vi dự kiến với reference PR #644. Theo dõi cách databricks-sql-nodejs báo cáo metadata cho hai truy vấn SELECT NULL. Hoàn thành khi cả kết quả live và kết quả rỗng đều báo cáo STRING cho cả hai cột, giữ nguyên tên và các giá trị null, đồng thời đáp ứng các row-count assertions được liệt kê.

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-nodejs. 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-nodejs) is fixed, then flips green as a tripwire.

Findings

  • DATATYPE-042 [sea]: SEA/kernel reports NULL_TYPE (TTypeId 16) for an untyped SELECT NULL (VOID) result column instead of its STRING type, so it disagrees with a CAST(NULL AS STRING) sibling in the same result set; Thrift correctly reports STRING_TYPE
    • failing test: untyped NULL column is reported as STRING, matching its CAST(NULL AS STRING) sibling [sea] (see the coverage PR diff under tests/)
  • DATATYPE-042: SEA/kernel reports NULL_TYPE (TTypeId 16) for an untyped SELECT NULL (VOID) result column instead of its STRING type, so the column disagrees with a CAST(NULL AS STRING) sibling in the same result set; Thrift correctly reports STRING_TYPE

Reproduce & Expected

DATATYPE-042 — Verify that an UNTYPED NULL column -- a bare SELECT NULL expression, whose Databricks SQL type is VOID (spelled NULL on some surfaces) -- is reported by the driver as its STRING type, identically t…

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):

  • completes without an exception
  • result has 2 column(s)
  • col 0 is named untyped_null
  • col 1 is named typed_null_string
  • result has exactly 1 row(s)
  • col untyped_null, row 0 is null
  • col typed_null_string, row 0 is null
  • completes without an exception
  • result has 2 column(s)
  • col 0 is named untyped_null
  • col 1 is named typed_null_string
  • result has exactly 0 row(s)
  • full assertion contract:
result:
- label: live_data
  no_exception: true
- label: live_data
  column_count: 2
- label: live_data
  column:
    index: 0
    name: untyped_null
- label: live_data
  column:
    index: 1
    name: typed_null_string
- label: live_data
  column_reported_type:
    name: untyped_null
    equals: STRING
- label: live_data
  column_reported_type:
    name: typed_null_string
    equals: STRING
- label: live_data
  column_reported_types_match:
    columns:
    - untyped_null
    - typed_null_string
- label: live_data
  row_count: 1
- label: live_data
  column:
    name: untyped_null
    is_null: true
- label: live_data
  column:
    name: typed_null_string
    is_null: true
- label: live_data
  column_data_agrees_with_reported_type:
    columns:
    - untyped_null
    - typed_null_string
- label: empty_result
  no_exception: true
- 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
  column_reported_type:
    name: untyped_null
    equals: STRING
- label: empty_result
  column_reported_type:
    name: typed_null_string
    equals: STRING
- label: empty_result
  column_reported_types_match:
    columns:
    - untyped_null
    - typed_null_string
- label: empty_result
  row_count: 0

Context

Ngôn ngữ chính
TypeScript
Star
36
Fork
50
Merge trung bình
13 giờ 46 phút
Pull request đã merge (30 ngày)
9

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-nodejs

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

Issue tương tự

Thêm issue về TypeScript

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.