Repository navigation
[PECOBLR-2065] c-abi: add kernel_metadata_list_table_types - #205
Merged
Merged
Conversation
vikrantpuppala
temporarily deployed
to
azure-prod
July 31, 2026 10:00 — with
GitHub Actions
Inactive
vikrantpuppala
temporarily deployed
to
azure-prod
July 31, 2026 10:00 — with
GitHub Actions
Inactive
vikrantpuppala
temporarily deployed
to
azure-prod
July 31, 2026 10:00 — with
GitHub Actions
Inactive
Expose the existing Metadata::table_types() over the C ABI so C / ODBC consumers can enumerate the supported table types. This backs ODBC SQLTables(table_type = SQL_ALL_TABLE_TYPES), the third catalog/schema/ table-type enumeration sentinel — the ODBC bridge already routes the all-catalogs / all-schemas sentinels to list_catalogs / list_schemas but had no C ABI call for table types. The call is static (no wire request): the type set comes from the session's transport (Transport::list_table_types). The stream carries a single TABLE_TYPE column (JDBC getTableTypes shape), mirroring the other list_* entry points. Adds a wiremock C ABI test that opens a session, drives the raw FFI function, and asserts the single-column shape with at least one row. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
vikrantpuppala
force-pushed
the
feat/c-abi-list-table-types
branch
from
July 31, 2026 10:03
9d9d8b5 to
33211ff
Compare
vikrantpuppala
temporarily deployed
to
azure-prod
July 31, 2026 10:03 — with
GitHub Actions
Inactive
vikrantpuppala
temporarily deployed
to
azure-prod
July 31, 2026 10:03 — with
GitHub Actions
Inactive
vikrantpuppala
temporarily deployed
to
azure-prod
July 31, 2026 10:03 — with
GitHub Actions
Inactive
vikrantpuppala
temporarily deployed
to
azure-prod
July 31, 2026 10:03 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expose the existing
Metadata::table_types()over the C ABI askernel_metadata_list_table_types, so C / ODBC consumers can enumerate the supported table types (TABLE,VIEW,SYSTEM TABLE,METRIC_VIEW, …).This backs the ODBC
SQLTables(table_type = SQL_ALL_TABLE_TYPES)enumeration sentinel. The ODBC bridge already routes the all-catalogs / all-schemas sentinels tokernel_metadata_list_catalogs/list_schemas, but there was no C ABI call for table types (theMetadatalayer hadtable_types(), it just wasn't wired to the FFI — noted as a follow-up insrc/c_abi/metadata.rs).Details
Transport::list_table_types), same as the Rust/pyo3/napi surfaces.TABLE_TYPEcolumn (JDBCgetTableTypesshape), mirroring the otherlist_*entry points, which keep their JDBC-canonical column shape and let drivers reshape on top.include/databricks_kernel.h, mirroringkernel_metadata_list_catalogs.Test plan
tests/v0_c_abi_metadata_table_types_wiremock.rs): opens a real session over the C ABI, drives the rawkernel_metadata_list_table_typesFFI function, imports the exported schema/batches, and asserts the single-TABLE_TYPE-column shape with ≥1 row.cargo fmt,cargo clippy --all-targets -- -D warningsclean.c_abi(20) andmetadata(144) lib tests pass.Downstream
Once merged, the ODBC driver re-pins this kernel commit and wires
SQLTables(table_type = "%")to this call, completing the third enumeration sentinel (databricks/databricks-odbc#141). The catalogs/schemas sentinels already landed in databricks/databricks-odbc#157.This pull request and its description were written by Isaac.