Package dev.frostlake.executor
Class StageFileResolver
java.lang.Object
dev.frostlake.executor.StageFileResolver
- All Implemented Interfaces:
StageFileLocator
Resolves the stage references
TO_FILE is given, reusing the executor's own
QueryExecutor.resolveCopyBaseDir(String) — the one place that already knows how
@stage, @db.schema.stage, @~ and @%table map onto local directories.
Only the two descriptor-facing names are computed here.
The STAGE display was measured live. A named stage always renders fully
qualified and upper-cased regardless of how the caller wrote it — from a session on
PROBE135B_DB.OTHER, TO_FILE('@s.sse2/hello.txt') reports
@PROBE135B_DB.S.SSE2 — so missing parts are filled from the current database and schema. The
user stage renders @"~" and a table stage renders the bare upper-cased table name
(@TSTG), with no database or schema even when the reference carried one.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolve a stage reference to the file it names.
-
Constructor Details
-
StageFileResolver
-
-
Method Details
-
locate
Description copied from interface:StageFileLocatorResolve a stage reference to the file it names.- Specified by:
locatein interfaceStageFileLocator- Parameters:
location- a stage reference:@stage/path,@db.schema.stage/path,@~/pathor@%table/path- Returns:
- the resolved file, or null when the reference names no stage this engine can reach (the caller turns that into Snowflake's "was not found" error)
-