Repository navigation
fix(metadata): preserve unknown table types - #506
Conversation
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 Low
Looks good, with one low concern. Null and empty values are set to TABLE before the type filter and sort run. That matches JDBC and also avoids putting nulls in the non-nullable TABLE_TYPE field. A nit: since utf8_column already returns all-null for a missing column, the early-return branch could be merged into the null-mapping path.
| ], | ||
| ) | ||
| .unwrap(); | ||
| let output = reshape_tables(&batch, Some("main"), None).unwrap(); |
There was a problem hiding this comment.
🔵 Low — The new test only calls reshape_tables with table_types = None. Nothing checks that rows with null or empty types now pass a TABLE filter and are dropped by a VIEW filter. Add a call with Some(&["TABLE"]) and one with Some(&["VIEW"]) and assert the results.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
I'd also trigger comparator run before merging. presumably this will resolve https://databricks.atlassian.net/browse/PECOBLR-4131 and https://databricks.atlassian.net/browse/PECOBLR-4164? then we can remove some of the exclusion in https://github.com/databricks/databricks-driver-test/blob/main/tests/comparator-tests/python/config/thrift-vs-sea.yaml
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
|
Updated the fix to preserve legacy Focused Thrift-vs-kernel validation using locally rebuilt drivers:
The focused kernel unit tests also pass. After this merges, we can remove the PECOBLR-4131 and PECOBLR-4164 comparator suppressions. |
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 Low · 1 Nit
Looks good, with 2 low concerns. Null and empty table types are handled the same way on the native and SQL-fallback paths, and the tests cover missing, null, empty and filtered cases. One public rustdoc is now stale, and the new helper duplicates an existing one.
Other findings
- ⚪ Nit —
table_type_columnre-implements the null-to-"" substitution thatutf8_column_or_emptyalready does. Return the constant "TABLE" column whentableTypeis absent, and otherwise callutf8_column_or_empty. (Found by Claude Opus 5.5 · confirmed by the judge)
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
Description
Preserve present null and empty
tableTypemetadata values as an empty string, while continuing to default a missingtableTypecolumn toTABLE. Legacy Hive Metastore responses can include rows whose type is unknown; retaining those rows under non-empty table-type filters matches existing Thrift behavior for Python and Node kernel-backed drivers.The behavior is applied consistently to both the SQL-fallback and native metadata paths. Non-empty server-provided table types remain unchanged, and an explicitly empty type filter still returns no rows.
Testing
cargo +stable fmt --all -- --checkAdditional notes
After this merges, the PECOBLR-4131 and PECOBLR-4164 comparator suppressions can be removed in https://github.com/databricks/databricks-driver-test/pull/2367.
This PR was created with GitHub MCP.