Expand description
Spark-reference session/navigation statements that DataFusion’s planner does not handle natively (Phase 60 statement completion).
DataFusion 54 already plans SET/RESET, SHOW TABLES|COLUMNS|FUNCTIONS,
SHOW CREATE, TRUNCATE TABLE, DESCRIBE <table>, and EXPLAIN. This
module fills the two navigation gaps a SQL/BI client expects:
USE [CATALOG|SCHEMA|DATABASE|NAMESPACE] <name>— set the session’s current catalog/schema so subsequent unqualified table references resolve there (SparkUSE).USE a.bsets cataloga, schemab.SHOW DATABASES/SHOW SCHEMAS— list schemas; rewritten to aninformation_schema.schemataquery returning a Spark-stylenamespacecolumn.
CACHE/UNCACHE TABLE (session materialization), SHOW PARTITIONS (Iceberg
metadata), and DESCRIBE FUNCTION|DATABASE|QUERY remain the itemized
statement shortfall in the matrix.
Structs§
- UseTarget
- The parsed target of a
USEstatement.
Functions§
- apply_
use - Apply a
USEtarget to the session by mutating the default catalog/schema. ReturnsSome(Ok(()))when the query was aUSEstatement (handled), orNonewhen it was not. - parse_
use - Parse a
USE …statement into its catalog/schema target, orNoneif the query is not aUSEstatement. - rewrite_
show_ databases - If
queryisSHOW DATABASES/SHOW SCHEMAS(optionallyLIKE 'pat'), return an equivalentinformation_schema.schemataSELECT; otherwiseNone. The result column isnamespace, matching Spark’sSHOW DATABASES.