Skip to content

fix(metadata): match list_tables table_types case-sensitively for Thrift parity - #393

Merged
vuanhphung merged 1 commit into
mainfrom
fix/table-types-case-sensitive
Oct 12, 2026
Merged

vuanhphung merged 1 commit into
mainfrom
fix/table-types-case-sensitive

Conversation

@vuanhphung

Copy link
Copy Markdown
Collaborator

What

#139 made the list_tables table_types filter case-insensitive, so ["table"] matched TABLE rows. Thrift GetTables matches exactly. The server filters with tableTypes.contains(tableType) in SparkGetTablesOperation, and JDBC re-filters client-side the same way. Python and Node.js forward the list to the server unchanged. So the kernel returned rows where Thrift returned none. This PR restores the exact match in filter_tables_by_type, which covers both the SHOW TABLES and the Thrift-native metadata paths. Catalog matching on the native path stays case-insensitive.

Verified live on a pecotesting warehouse (main.default_schema, one table + one view) with kernel 1.1.0:

table_types Python Thrift Python kernel Node Thrift Node kernel
["TABLE"] 1 1 1 1
["table"] 0 1 0 1
["view"] 0 1 0 1

With this change, the kernel columns match Thrift.

Follow-up: tests/e2e/test_kernel_backend.py::test_tables_table_types_filter_is_case_insensitive in databricks-sql-python asserts the old behavior. It needs flipping when the connector picks up this kernel.

Testing

Updated unit tests for the exact match and added a case-sensitivity test. cargo +stable fmt --all, cargo clippy --all-targets -- -D warnings, cargo test all pass.

This pull request and its description were written by Isaac.

…ift parity

#139 made the table_types filter case-insensitive, so ["table"] matched
TABLE rows. Thrift GetTables matches exactly (server-side in
SparkGetTablesOperation, and JDBC re-filters client-side the same way),
so the kernel returned rows where Thrift returned none. Restore the exact
match.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.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.

@vuanhphung vuanhphung added the integration-test Maintainer-only: triggers cross-repo integration tests. Auto-removed on push for re-review. label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Kernel integration tests triggered. View status. Results post back here as the "Kernel Integration Tests" check.

@vuanhphung
vuanhphung added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 615c008 Oct 12, 2026
27 checks passed

This branch was previously deployed

1 inactive deployment
azure-prod — 04a0c3e9 Deployed Oct 9, 2026 by vuanhphung via v0 TLS (mitmproxy) #995
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-test Maintainer-only: triggers cross-repo integration tests. Auto-removed on push for re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants