Package dev.frostlake.executor.commands
package dev.frostlake.executor.commands
-
ClassDescriptionHandles
ALTER <object-type> …statements for DATABASE / SCHEMA / MASKING & ROW ACCESS POLICY / TABLE / VIEW / STREAM / TASK / PIPE / WAREHOUSE / STAGE / USER / ROLE / SESSION / TAG, extracted verbatim fromSQLCommandVisitor.visitAlterStatement(dev.frostlake.parser.FrostlakeParser.AlterStatementContext).Handles Snowflake ScriptingBEGIN … [EXCEPTION …] ENDblocks, extracted verbatim fromSQLCommandVisitor.visitBeginEndBlock(dev.frostlake.parser.FrostlakeParser.BeginEndBlockContext)together with its cohesive exception-handling helpers (bindHandlerErrorVariables,shouldHandleException,matchesSnowflakeException— each used only by this path).A definition may not carry an unnamed bind.Validates clustering-key expressions: every column reference must name a column of the table.Parses column / data-type / constraint / default-value grammar into metastore models — extracted fromDDLCommandHandler(CREATE TABLE, CREATE FUNCTION/PROCEDURE parameters, DROP FUNCTION arg types, ALTER) so those handlers share one parser.Base interface for SQL command handlersHandlesCOMMENT ON <object-type> …statements, extracted verbatim fromSQLCommandVisitor.visitCommentStatement(dev.frostlake.parser.FrostlakeParser.CommentStatementContext).Handles CREATE for infrastructure objects — TASK, PIPE, SEQUENCE, WAREHOUSE, STAGE — extracted fromDDLCommandHandler, which keeps the CREATE dispatch and delegates here.Handles the namespace CREATE shapes — DATABASE and SCHEMA (including CLONE) — extracted fromDDLCommandHandler, which keeps the CREATE dispatch and delegates here.Handles the SELECT-backed CREATE shapes — VIEW, MATERIALIZED VIEW, and DYNAMIC TABLE — extracted fromDDLCommandHandler, which keeps the CREATE dispatch and delegates here.Handles CREATE FUNCTION and CREATE PROCEDURE (UDF / stored-procedure creation across SQL/JS/Python/Java/ Scala), extracted fromDDLCommandHandler, which keeps the CREATE dispatch and delegates here.Handles CREATE for security / governance objects — TAG, MASKING POLICY, ROW ACCESS POLICY, USER, ROLE — extracted fromDDLCommandHandler, which keeps the CREATE dispatch and delegates here.Handles CREATE TABLE (plain, CLONE, and CREATE TABLE AS SELECT), extracted fromDDLCommandHandler, which keeps the CREATE dispatch and delegates here.The onedataTypeNameparse-tree →DataTypemapping, shared by column / parameter definitions (ColumnDefinitionParser) and by expression casts (the expression AST builder), so a type spelled in a CREATE TABLE and the same type spelled in a CAST produce the same object.Handler for DDL (Data Definition Language) commands: CREATE, DROP, ALTER, USE, TRUNCATE, COMMENTHandler for DML (Data Manipulation Language) commands: INSERT, UPDATE, DELETE, MERGEHandles DROP statements (DROP TABLE/VIEW/DATABASE/SCHEMA/STREAM/TASK/SEQUENCE/...), extracted fromDDLCommandHandler, which keeps the public dispatch and delegates here.The properties ALTER DYNAMIC TABLE sets or unsets.HandlesGRANT …andREVOKE …statements, extracted verbatim fromSQLCommandVisitor.visitGrantStatement(dev.frostlake.parser.FrostlakeParser.GrantStatementContext)andSQLCommandVisitor.visitRevokeStatement(dev.frostlake.parser.FrostlakeParser.RevokeStatementContext).The type rule a masking policy attachment must pass.Handler for Query commands: SELECT statementsThe checks a row access policy attachment must pass, shared by the ALTER form and the CREATE TABLE / CREATE VIEW clauses — live makes the same ones wherever the attachment is written, with a single measured difference: an unknown column is aninvalid identifieron the ALTER path and acolumn 'X' does not existat CREATE, so the caller reports that one.Handler for SHOW and DESCRIBE commands: SHOW DATABASES, SHOW SCHEMAS, SHOW TABLES, DESCRIBE TABLE, etc.What the TERSE / STARTS WITH / LIMIT modifiers actually do to one SHOW listing.How Snowflake stores a dynamic table's TARGET_LAG: the input is canonicalized, not echoed.