Skip to content

fix(metadata): align getTypeInfo with Thrift - #291

Merged
cathleeny merged 7 commits into
mainfrom
PECOBLR-4166
Aug 25, 2026
Merged

cathleeny merged 7 commits into
mainfrom
PECOBLR-4166

Conversation

@cathleeny

@cathleeny cathleeny commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • align Kernel getTypeInfo with the established Thrift/HiveServer2 contract
  • return the canonical 18-column schema and 20-row type schema
  • update metadata mappings, documentation, and v0 integration coverage

Column-description comments are intentionally out of scope; column names, types, nullability, row order, and cell values match Thrift.

Validation

  • Kernel workspace test suite passed
  • focused schema, static-row, end-to-end, and WireMock metadata tests passed

@cathleeny
cathleeny marked this pull request as ready for review August 24, 2026 22:55
@cathleeny cathleeny added the engineer-bot Apply to an issue to trigger the engineer-bot; on a PR to enable engineer follow-up label Aug 24, 2026

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread src/metadata/static_data.rs Resolved
Comment thread src/metadata/static_data.rs Resolved
oss-engineer-bot Bot pushed a commit that referenced this pull request Aug 24, 2026
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>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread src/metadata/static_data.rs Resolved
Addresses:
  - #3848340224 at src/metadata/static_data.rs:89

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
@cathleeny cathleeny removed the engineer-bot Apply to an issue to trigger the engineer-bot; on a PR to enable engineer follow-up label Aug 24, 2026
This reverts commit 87f53e2.

Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@vikrantpuppala

Copy link
Copy Markdown
Collaborator

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?

@cathleeny

Copy link
Copy Markdown
Collaborator Author

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 listTypeInfo to align with the Thrift response. Both Python and Go drivers do not expose GetTypeInfo

At the comparator level, the node test list_type_info compares the Kernel/SEA schema to Thrift. I ran the comparator tests locally, but the automated bot should make the test changes

@vikrantpuppala

Copy link
Copy Markdown
Collaborator

thanks - can you also check https://github.com/databricks/databricks-odbc?

@cathleeny

Copy link
Copy Markdown
Collaborator Author

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

This branch was previously deployed

1 inactive deployment
azure-prod — 6dba008f Deployed Aug 24, 2026 by cathleeny via review #430
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants