Package dev.frostlake.executor.commands
Class CreateInfrastructureHandler
java.lang.Object
dev.frostlake.executor.commands.CreateInfrastructureHandler
- All Implemented Interfaces:
CommandHandler
Handles CREATE for infrastructure objects — TASK, PIPE, SEQUENCE, WAREHOUSE, STAGE — extracted from
DDLCommandHandler, which keeps the CREATE dispatch and delegates here. Shared schema/parsing
helpers are reached via the ddl back-reference.-
Method Summary
Modifier and TypeMethodDescriptionGet catalog instanceGet query executor instancehandleCreateComputePool(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE COMPUTE POOL.handleCreateCortexSearchService(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE CORTEX SEARCH SERVICE.handleCreateFileFormat(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreatePipe(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreateSequence(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreateStage(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreateTask(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreateWarehouse(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.frostlake.executor.commands.CommandHandler
extractComment, extractComment, getText, getText, qualifiedNameParts
-
Method Details
-
getCatalog
Description copied from interface:CommandHandlerGet catalog instance- Specified by:
getCatalogin interfaceCommandHandler- Returns:
- the engine's metastore catalog, holding the objects this handler reads and mutates
-
getQueryExecutor
Description copied from interface:CommandHandlerGet query executor instance- Specified by:
getQueryExecutorin interfaceCommandHandler- Returns:
- the engine's query executor, for handlers that run nested queries or need session state
-
handleCreateTask
-
handleCreatePipe
-
handleCreateSequence
-
handleCreateComputePool
public Object handleCreateComputePool(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE COMPUTE POOL. The name must be upper case; MIN_NODES, MAX_NODES and INSTANCE_FAMILY are required and reported missing in that order; MIN_NODES is at least 1 and no greater than MAX_NODES; INSTANCE_FAMILY must name a family from the account catalog. Every rejection uses a real account's wording. -
handleCreateWarehouse
public Object handleCreateWarehouse(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) -
handleCreateStage
-
handleCreateCortexSearchService
public Object handleCreateCortexSearchService(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE CORTEX SEARCH SERVICE. WAREHOUSE and TARGET_LAG are required and reported the way a real account reports them —Missing option(s): [WAREHOUSE]— rather than as a syntax error, so the grammar accepts the options in any order and the check lives here.The searched column and every attribute column must be projected by the defining query, which is run once at create time both to establish that column list and to reject a bad name the way live does: as an
invalid identifier. -
handleCreateFileFormat
public Object handleCreateFileFormat(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) -
handleAlterFileFormat
-