[coverage] Conformance findings: DATATYPE-043

Aperta
#1,770 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
database

Direzione di ricerca

Start with the testUntypedNullColumnReportedAsString xfail in the coverage PR under tests/, then trace how this JDBC driver builds ResultSetMetaData.getColumnTypeName() for an untyped NULL. Compare the reported type with the typed NULL sibling and the existing normalizations mentioned in the issue. Done when the untyped NULL reports STRING on both thrift and SEA and the conformance assertions pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-jdbc. 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-jdbc) is fixed, then flips green as a tripwire.

Findings

  • DATATYPE-043 [thrift, sea]: getColumnTypeName() reports "VOID" for an untyped NULL column instead of the driver's STRING type name, while getColumnType() for the same column is correctly Types.VARCHAR and the CAST(NULL AS STRING) sibling reports "STRING"
    • failing test: testUntypedNullColumnReportedAsString (see the coverage PR diff under tests/)
  • DATATYPE-043: ResultSetMetaData.getColumnTypeName() returns the raw server type name "VOID" for an untyped NULL column (SELECT NULL) on both thrift and SEA, while getColumnType() for that same column is correctly Types.VARCHAR and a CAST(NULL AS STRING) sibling reports "STRING" — so the column is type-distinguishable from an equivalent STRING column and schema-mirroring consumers see an unbindable VOID type; columnTypeText should be normalised to "STRING" as it already is for geospatial-disabled and TIMESTAMP_NTZ columns

Reproduce & Expected

DATATYPE-043 — Verify that an UNTYPED SQL NULL column -- SELECT NULL AS c, whose Databricks logical type is VOID -- is reported through the driver's result type-metadata surface as the driver's STRING type: the S…

Expected (per the shared spec):

  • result has exactly 1 row(s)
  • result has 3 column(s)
  • col untyped_null, row 0 is null
  • col typed_null_string, row 0 is null
  • col typed_int, row 0 == 1
  • full assertion contract:
result:
- row_count: 1
- column_count: 3
- reported_column_type:
    column: untyped_null
    same_as_column: typed_null_string
- reported_column_type:
    column: untyped_null
    sql_type: STRING
- reported_column_type:
    column: typed_int
    sql_type: INT
- column:
    name: untyped_null
    is_null: true
- column:
    name: typed_null_string
    is_null: true
- column:
    name: typed_int
    equals: 1

Context

Lingua principale
Java
Stelle
41
Fork
49
Merge medio
1g 7h
PR unite (30g)
27

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di databricks/databricks-jdbc

Tutte le issue di databricks/databricks-jdbc

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.