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:
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):
- 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_rowrow_count: 1
- label: live_rowcolumn_count: 2
- label: live_rowcolumn:
index: 0name: untyped_null
- label: live_rowcolumn:
index: 1name: typed_null_string
- label: live_rowcolumn:
name: untyped_nullis_null: true
- label: live_rowcolumn:
name: typed_null_stringis_null: true
- label: live_rowuntyped_null_reports_string_type:
columns:
- untyped_null
- typed_null_stringmatch_each_other: true
- label: empty_resultrow_count: 0
- label: empty_resultcolumn_count: 2
- label: empty_resultcolumn:
index: 0name: untyped_null
- label: empty_resultcolumn:
index: 1name: typed_null_string
- label: empty_resultuntyped_null_reports_string_type:
columns:
- untyped_null
- typed_null_stringmatch_each_other: true
Context
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
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 pathstest_untyped_null_column_reports_string_type(see the coverage PR diff undertests/)SELECT NULL, SQL VOID) passes the wire type through and reportscursor.descriptiontype_code 'null' instead of the connector's STRING type, while aCAST(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 pathsReproduce & 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 aCAST(NULL AS STRING)sibling selected by the SAME…Reproduce:
Expected (per the shared spec):
untyped_nulltyped_null_stringuntyped_null, row 0 is nulltyped_null_string, row 0 is nulluntyped_nulltyped_null_stringContext