You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metadata::list_tables treats empty table_types slice as match-none (should match all, like null) #187
Metadata::list_tables treats an emptytable_types slice (Some(&[])) as "match nothing" and returns zero rows, contradicting the JDBC/ADBC contract where an empty type filter is equivalent to null and matches all table types (TABLE, VIEW, …).
Surfaced by the multi-language conformance suite (databricks-driver-test, spec METADATA-035), committed there as an xfail (#[should_panic]) tripwire that will flip red once this is fixed.
Root cause
metadata/thrift_shape.rs::reshape_tables: the
Some(types) => filter_tables_by_type(rows, types)
arm runs unconditionally for anySome, and filter_tables_by_type's types.iter().any(...) is always false for an empty slice, so every row is dropped. A source comment deliberately chose "empty == filter accepting nothing" for Thrift parity, but the spec (and the C# ADBC driver) require empty to match all.
Expected
list_tables(catalog, schema, Some(&[])) should return the same rows as list_tables(catalog, schema, None) — i.e. all table types (TABLE + VIEW both present).
Actual
Returns 0 rows.
Repro
Conformance test get_tables_empty_table_types_filter_matches_all in tests/kernel/tests/metadata_operations.rs (databricks-driver-test). It asserts both TABLE and VIEW are returned for an empty table_types; currently fails (hence the xfail marker).
Activity
oss-engineer-bot commentedon Jul 30, 2026
🤖 engineer-bot opened a fix PR: #201
Review before merge.
test: fix list_tables signature in empty-types e2e after merge
fix(metadata): empty table_types slice matches NONE, not all (hiveser…
fix(metadata): empty table_types slice matches NONE, not all (hiveser…