Repository navigation
[coverage] Conformance findings: DATATYPE-043 #500
Copy link
Copy link
Open
Description
Summary
Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-go. 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-go) is fixed, then flips green as a tripwire.
Findings
- DATATYPE-043 [thrift, sea]: Result metadata reports no DECIMAL precision/scale: the rows type does not implement driver.RowsColumnTypeDecimalSize, so sql.ColumnType.DecimalSize() returns ok=false for DECIMAL(10,2)/(38,0)/(38,38) on both the with-rows and schema-only paths, losing the declared qualifiers for every metadata consumer while the value stays correct
- failing test:
TestDecimalPrecisionAndScaleInResultMetadata(see the coverage PR diff undertests/)
- failing test:
Reproduce & Expected
DATATYPE-043 — Verify the driver's RESULT-SET METADATA reports a DECIMAL column's DECLARED precision and scale -- for a result that has rows AND for a schema-only (zero-row) result, and including the scale-0 case.
Reproduce:
SELECT
CAST(3.5 AS DECIMAL(10, 2)) AS amount,
CAST(1 AS DECIMAL(38, 0)) AS whole,
CAST(0.1 AS DECIMAL(38, 38)) AS all_fraction
SELECT
CAST(3.5 AS DECIMAL(10, 2)) AS amount,
CAST(1 AS DECIMAL(38, 0)) AS whole,
CAST(0.1 AS DECIMAL(38, 38)) AS all_fraction
WHERE 1 = 0Expected (per the shared spec):
- result has exactly 1 row(s)
- col
amount, row 0 == 3.5 - result has exactly 0 row(s)
- full assertion contract:
result:
- label: with_rows
row_count: 1
- label: with_rows
decimal_type_qualifiers:
column: amount
precision: 10
scale: 2
- label: with_rows
decimal_type_qualifiers:
column: whole
precision: 38
scale: 0
- label: with_rows
decimal_type_qualifiers:
column: all_fraction
precision: 38
scale: 38
- label: with_rows
column:
name: amount
equals: 3.5
- label: schema_only
row_count: 0
- label: schema_only
decimal_type_qualifiers:
column: amount
precision: 10
scale: 2
- label: schema_only
decimal_type_qualifiers:
column: whole
precision: 38
scale: 0
- label: schema_only
decimal_type_qualifiers:
column: all_fraction
precision: 38
scale: 38Context
- The behavior was first fixed in a DIFFERENT driver — reference PR: feat: support geospatial results on the kernel path databricks-sql-nodejs#535 — which seeded the shared language-neutral spec. This issue tracks the same conformance gap in databricks/databricks-sql-go; 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/1848
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity