Skip to content

DeltaSqlAstBuilder

DeltaSqlAstBuilder is a command builder for the Delta SQL statements (described in DeltaSqlBase.g4 ANTLR grammar).

DeltaSqlParser is used by DeltaSqlParser.

SQL Statement Logical Command
ALTER TABLE ADD CONSTRAINT AlterTableAddConstraint
ALTER TABLE DROP CONSTRAINT AlterTableDropConstraint
CONVERT TO DELTA ConvertToDeltaCommand
DESCRIBE DETAIL DescribeDeltaDetailCommand
DESCRIBE HISTORY DescribeDeltaHistoryCommand
GENERATE DeltaGenerateCommand
OPTIMIZE OptimizeTableCommand
RESTORE RestoreTableStatement
VACUUM VacuumTableCommand

maybeTimeTravelChild

maybeTimeTravelChild(
  ctx: TemporalClauseContext,
  child: LogicalPlan): LogicalPlan

maybeTimeTravelChild creates a TimeTravel (with sql ID).

maybeTimeTravelChild is used when:

visitClone

visitClone(
  ctx: CloneContext): LogicalPlan

visitClone creates a CloneTableStatement logical operator.

visitClusterBy

visitClusterBy(
  ctx: ClusterByContext): LogicalPlan

visitClusterBy creates a ClusterByPlan (with a ClusterBySpec) for CLUSTER BY clause.

CLUSTER BY (interleave, [interleave]*)

interleaves are the column names to cluster by.

Note

CLUSTER BY is similar to ZORDER BY syntax-wise.

visitDescribeDeltaHistory

visitDescribeDeltaHistory(
  ctx: DescribeDeltaHistoryContext): LogicalPlan

visitDescribeDeltaHistory creates a DescribeDeltaHistory logical operator for the following SQL statement:

(DESC | DESCRIBE) HISTORY (path | table)
  (LIMIT limit)?

visitReorgTable

visitReorgTable(
  ctx: ReorgTableContext): AnyRef

visitReorgTable creates a DeltaReorgTable logical operator.