Package dev.frostlake.executor
Class WarehouseReference
java.lang.Object
dev.frostlake.executor.WarehouseReference
Refusing a statement that names a warehouse which is not there.
Snowflake validates the reference at CREATE time, and phrases the refusal TWO different ways — live-verified, both against the same missing warehouse:
CREATE TASK … WAREHOUSE = nosuch_wh -> Nonexistent warehouse NOSUCH_WH was specified. CREATE DYNAMIC TABLE … WAREHOUSE = nosuch_wh -> Warehouse 'NOSUCH_WH' does not exist. CREATE CORTEX SEARCH SERVICE … WAREHOUSE = … -> Warehouse 'NOSUCH_WH' does not exist.
Note what is NOT validated: CREATE USER … DEFAULT_WAREHOUSE = nosuch_wh is ACCEPTED, so a
blanket rule over every warehouse-shaped property would be stricter than Snowflake. Only the
statements measured above check.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidThe phrasing every other statement uses.static voidrequireForTask(Catalog catalog, String warehouse) The TASK phrasing: the name bare and upper-cased, no quotes, and noSQL compilation error:prefix — a task's warehouse check is not a compilation error live.
-
Method Details
-
requireForTask
The TASK phrasing: the name bare and upper-cased, no quotes, and noSQL compilation error:prefix — a task's warehouse check is not a compilation error live. -
require
The phrasing every other statement uses. Deliberately NOTSqlCompilationError.doesNotExist(java.lang.String, java.lang.String): that shape ends "does not exist or not authorized." and opens with a "SQL compilation error:" line, and this message has neither — measured verbatim asWarehouse 'NOSUCH_WH' does not exist.
-