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-041 [thrift]: DECIMAL text rendering falls back to scientific notation for sub-1 high-scale values: DECIMAL(20,7) 0.0000001 is returned as the string "1E-7" instead of plain notation at the declared scale (PECOBLR-2096)
- failing test:
TestDecimalTextRenderingWithoutScientificNotation (see the coverage PR diff under tests/)
- DATATYPE-041: DECIMAL text rendering falls back to scientific notation for sub-1 high-scale values: DECIMAL(20,7) 0.0000001 is returned as the string "1E-7" instead of plain notation at the declared scale, so a consumer reading the column as text parses a wrong or unparseable value (PECOBLR-2096)
Reproduce & Expected
DATATYPE-041 — Verify that when a driver renders a DECIMAL column as text, the rendering is PLAIN decimal notation carrying the column's declared scale -- never scientific notation, never a re-scaled or truncated m…
Expected (per the shared spec):
- result has exactly 1 row(s)
- col
zero_scaled, row 0 == 0
- col
sub_one, row 0 == 0.5
- col
neg_sub_one, row 0 == -0.05
- col
sub_one_high_scale, row 0 == 1e-07
- col
trailing_zeros, row 0 == 100.0
- col
wide_magnitude, row 0 == 1.2345678901234568e+26
- full assertion contract:
result:
- row_count: 1
- column:
name: zero_scaled
equals: 0
- column:
name: sub_one
equals: 0.5
- column:
name: neg_sub_one
equals: -0.05
- column:
name: sub_one_high_scale
equals: 1.0e-07
- column:
name: trailing_zeros
equals: 100.0
- column:
name: wide_magnitude
equals: 1.2345678901234568e+26
- decimal_text_plain_notation:
columns:
- zero_scaled
- sub_one
- neg_sub_one
- sub_one_high_scale
- trailing_zeros
- wide_magnitude
Context
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
TestDecimalTextRenderingWithoutScientificNotation(see the coverage PR diff undertests/)Reproduce & Expected
DATATYPE-041 — Verify that when a driver renders a DECIMAL column as text, the rendering is PLAIN decimal notation carrying the column's declared scale -- never scientific notation, never a re-scaled or truncated m…
Expected (per the shared spec):
zero_scaled, row 0 == 0sub_one, row 0 == 0.5neg_sub_one, row 0 == -0.05sub_one_high_scale, row 0 == 1e-07trailing_zeros, row 0 == 100.0wide_magnitude, row 0 == 1.2345678901234568e+26Context