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:
SELECTNULLAS untyped_null, CAST(NULLAS STRING) AS typed_null_string
SELECTNULLAS untyped_null, CAST(NULLAS STRING) AS typed_null_string FROM range(1) WHERE1=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_datano_exception: true
- label: live_datacolumn_count: 2
- label: live_datacolumn:
index: 0name: untyped_null
- label: live_datacolumn:
index: 1name: typed_null_string
- label: live_datacolumn_reported_type:
name: untyped_nullequals: STRING
- label: live_datacolumn_reported_type:
name: typed_null_stringequals: STRING
- label: live_datacolumn_reported_types_match:
columns:
- untyped_null
- typed_null_string
- label: live_datarow_count: 1
- label: live_datacolumn:
name: untyped_nullis_null: true
- label: live_datacolumn:
name: typed_null_stringis_null: true
- label: live_datacolumn_data_agrees_with_reported_type:
columns:
- untyped_null
- typed_null_string
- label: empty_resultno_exception: true
- label: empty_resultcolumn_count: 2
- label: empty_resultcolumn:
index: 0name: untyped_null
- label: empty_resultcolumn:
index: 1name: typed_null_string
- label: empty_resultcolumn_reported_type:
name: untyped_nullequals: STRING
- label: empty_resultcolumn_reported_type:
name: typed_null_stringequals: STRING
- label: empty_resultcolumn_reported_types_match:
columns:
- untyped_null
- typed_null_string
- label: empty_resultrow_count: 0
Context
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
SELECT NULL(VOID) result column instead of its STRING type, so it disagrees with aCAST(NULL AS STRING)sibling in the same result set; Thrift correctly reports STRING_TYPEuntyped NULL column is reported as STRING, matching its CAST(NULL AS STRING) sibling [sea](see the coverage PR diff undertests/)SELECT NULL(VOID) result column instead of its STRING type, so the column disagrees with aCAST(NULL AS STRING)sibling in the same result set; Thrift correctly reports STRING_TYPEReproduce & Expected
DATATYPE-042 — Verify that an UNTYPED NULL column -- a bare
SELECT NULLexpression, whose Databricks SQL type is VOID (spelled NULL on some surfaces) -- is reported by the driver as its STRING type, identically t…Reproduce:
Expected (per the shared spec):
untyped_nulltyped_null_stringuntyped_null, row 0 is nulltyped_null_string, row 0 is nulluntyped_nulltyped_null_stringContext