Repository navigation
fix(metadata): align getTypeInfo with Thrift - #291
Conversation
2fd1e28 to
84ff002
Compare
There was a problem hiding this comment.
Verdict: 1 Medium · 1 Low
Solid, well-tested refactor that realigns type_info to the 18-column/20-row Thrift getTypeInfo shape; the removed type_mapping constants are correctly retained behind #[allow(dead_code)] so clippy stays clean, and no downstream in-crate consumer hard-codes the old 19-column shape. One medium concern: CASE_SENSITIVE is true only for STRING while CHAR/VARCHAR are false, which looks like a parity miss vs Hive's Type.isCaseSensitive() — worth confirming against the reference. The value-level tests only lock the implementation's own output, so such a mismatch wouldn't be caught (low).
Addresses: - #3848176360 at src/metadata/static_data.rs:207 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good overall — the 18-column schema and derived cell values faithfully mirror HiveServer2's GetTypeInfoOperation (column order, i16 typing, UNSIGNED_ATTRIBUTE = !numeric, NUM_PREC_RADIX only for numerics), tests are internally consistent, unused constants were cleaned up, and docs/changelog are updated. One low-confidence parity question on CASE_SENSITIVE for CHAR/VARCHAR (posted inline) is worth confirming against a real Thrift response, since the tests only prove self-consistency (as the PR discloses).
Addresses: - #3848340224 at src/metadata/static_data.rs:89 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
This reverts commit 87f53e2. Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
|
few questions - do you know which drivers depend on this function and what is the impact of this change on those drivers, any at the comparator level, etc? |
The primary consumer is the Node driver and this change only affects the Kernel/SEA path for At the comparator level, the node test |
|
thanks - can you also check https://github.com/databricks/databricks-odbc? |
ODBC driver builds type info locally, so it shouldn't be impacted by the kernel change |
Summary
getTypeInfowith the established Thrift/HiveServer2 contractColumn-description comments are intentionally out of scope; column names, types, nullability, row order, and cell values match Thrift.
Validation