[coverage] Conformance findings: DATATYPE-042
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 58/100
Rechercherichtung
Beginne mit dem Coverage-PR-Diff unter tests/ und dem fehlgeschlagenen Test namens test_untyped_null_column_reports_string_type. Verfolge anschließend, wie cursor.description die Schematypen für Ergebnisse mit Daten und leere Ergebnisse herleitet. Überprüfe, dass sowohl SELECT NULL als auch CAST(NULL AS STRING) in beiden Pfaden denselben STRING-Typ melden, und behalte dabei die angegebenen Assertions zu Zeilen, Spalten, Namen und Nullwerten bei.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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 undertests/)
- failing test:
- DATATYPE-042: Over the Rust kernel (SEA), an untyped NULL column (
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 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
- The behavior was first fixed in a DIFFERENT driver — reference PR: https://github.com/databricks/databricks-sql-kernel/pull/235 — which seeded the shared language-neutral spec. This issue tracks the same conformance gap in databricks/databricks-sql-python; the reference PR is for cross-referencing the intended behavior, NOT a change to this repo.
- Coverage PR carrying the reproducing xfail test(s): https://github.com/databricks/databricks-driver-test/pull/1223
- Vorherrschende Sprache
- Python
- Sterne
- 233
- Forks
- 152
- Ø Merge
- 21 Std. 5 Min.
- Gemergte PRs (30 T.)
- 10
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus databricks/databricks-sql-python
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Alle Issues in databricks/databricks-sql-python
Ähnliche Issues
-
triage/confirmed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
apache/cloudstack#14222 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100