Repository navigation
fix(metadata): align GetFunctions with JDBC - #363
vuanhphung wants to merge 5 commits into
Conversation
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Solid, well-tested change that brings getFunctions into line with the JDBC driver — I verified the catalog resolution order, SHOW FUNCTIONS IN CATALOG SQL shape, wildcard→Hive conversion, native-vs-fallback FUNCTION_CAT override, and FUNCTION_TYPE narrowing all match DatabricksMetadataQueryClient/CommandBuilder/MetadataResultSetBuilder. One low-severity inconsistency in REMARKS null handling between the native and fallback paths is worth a look; otherwise no correctness concerns.
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — the SHOW FUNCTIONS grammar, the null-catalog resolution chain (current-catalog → session catalog → hive_metastore), the once-only SQL escaping in jdbc_pattern_to_hive, and the native-vs-SHOW FUNCTION_CAT handling all match the JDBC reference driver, and the classic single-column fallback is handled via null-filling helpers. One low-severity note: REMARKS null-handling diverges between the native path (normalized to "") and the SHOW fallback path (left null).
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
getFunctionspreviously usedinformation_schema.routinesand produced inconsistent catalogs and result shapes between native and fallback metadata paths.FUNCTION_CAThandling differed across metadata paths.hive_metastorefor the SQL query. Native rows preserve the original catalog argument, including null; fallback rows use the resolved catalog.FUNCTION_TYPE: Int32failed against the JDBCInt16schema.SHOW FUNCTIONSshape.function-column results.This is the function-only subset of closed PR #354; table, column, schema, and key normalization is intentionally excluded.
Testing:
cargo +stable fmt --all -- --check,cargo clippy --all-targets -- -D warnings, andcargo test.