Package dev.frostlake.config
Class EngineConfig
java.lang.Object
dev.frostlake.config.EngineConfig
Configuration manager for Frostlake SQL Engine
Loads configuration from frostlake.properties file
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringOpt-in forfile://(and bare local-path) stage URLs, which a real account refuses.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionEngineConfig(String configFilePath) EngineConfig(Properties overrides) Configuration with explicit programmatic overrides: the built-in defaults and any discoveredfrostlake.properties(classpath / working directory /~/.frostlake) load first, thenoverridesapply last and win. -
Method Summary
Modifier and TypeMethodDescriptionThe account LOCATOR, which CURRENT_ACCOUNT() answers with.The account NAME, which CURRENT_ACCOUNT_NAME() answers with — a different identifier from the locator: measured on a real account, CURRENT_ACCOUNT() is PG65914 while CURRENT_ACCOUNT_NAME() is WJ64893, and SHOW ACCOUNTS reports them in separate columns.booleangetBooleanProperty(String key, boolean defaultValue) intintgetIntProperty(String key, int defaultValue) intThe organization the account belongs to, which CURRENT_ORGANIZATION_NAME() answers with.getProperty(String key, String defaultValue) A GraalPy virtual environment whose installed packages (numpy, pandas, ...) become importable from Python UDF/procedure handlers — the local stand-in for Snowflake'sPACKAGES=(...)clause.intintintLocal filesystem root backing the implicit internal stages — the user stage (@~) and per-table stages (@%table), which have noCREATE STAGE/ URL.Explicits3://-prefix → local-directory overrides for S3 resolution:';'-separateds3prefix=localdirpairs (longest matching prefix wins).Local filesystem base for resolvings3://bucket/keyreferences (an unmapped key resolves to<root>/bucket/key).intWhen > 0 and the WAL is enabled, the engine writes a checkpoint (a full state snapshot plus log truncation) after this many committed transactions, bounding the log's growth and speeding recovery. 0 (the default) disables automatic checkpointing —DatabaseEngine.checkpoint()can still be called explicitly.booleanbooleanWhen true (the default), DML buffers into a per-transaction write set and applies it on COMMIT (deferred apply), giving real atomicity + READ COMMITTED across INSERT/UPDATE/DELETE/MERGE.booleanbooleanWhen true (the default), DML coerces write values to the column type (VARCHAR(n) length enforcement, numeric-string parsing, rejecting clearly-incompatible values), matching Snowflake.booleanbooleanbooleanbooleanWhen true, the destructiveREMOVE/RM @stagecommand (which deletes the files backing a stage on the local filesystem) is allowed.booleanWhen true,CREATE STAGEacceptsfile://(and bare local-path) URLs backed by the local filesystem — the local-development affordance.booleanWhether the engine arms the task scheduler as it finishes starting, so tasks left in the STARTED state — typically by a restore, since that writes the state without arming anything — begin firing on their schedule again.booleanbooleanWhen true, committed mutating statements are appended to a write-ahead log (fsync on commit) and replayed on startup, so committed work survives a crash.booleanWhen true (the default), window functions evaluate their argument once per partition row into a per-batch vector and every output row's frame reads that vector — instead of re-evaluating the argument for each frame row, which makes a running frame quadratic in expression walks.voidsetProperty(String key, String value)
-
Field Details
-
PROP_HTTP_PORT
- See Also:
-
PROP_HTTP_HOST
- See Also:
-
PROP_HTTP_MAX_CONNECTIONS
- See Also:
-
PROP_DATABASE_DEFAULT
- See Also:
-
PROP_SCHEMA_DEFAULT
- See Also:
-
PROP_ACCOUNT_ID
- See Also:
-
PROP_ACCOUNT_NAME
- See Also:
-
PROP_ORGANIZATION_NAME
- See Also:
-
PROP_SNOWFLAKE_REGION
- See Also:
-
PROP_CONSTRAINTS_ENFORCE_PRIMARY_KEY
- See Also:
-
PROP_CONSTRAINTS_ENFORCE_UNIQUE_KEY
- See Also:
-
PROP_CONSTRAINTS_ENFORCE_TYPES
- See Also:
-
PROP_TIME_TRAVEL_ENABLED
- See Also:
-
PROP_EXECUTION_WINDOW_FRAME_VECTORS
- See Also:
-
PROP_TRANSACTION_DEFERRED_APPLY
- See Also:
-
PROP_COMMAND_REMOVE_ENABLED
- See Also:
-
PROP_DEFAULT_USER
- See Also:
-
PROP_STORAGE_IN_MEMORY
- See Also:
-
PROP_PERSISTENCE_ENABLED
- See Also:
-
PROP_PERSISTENCE_DIRECTORY
- See Also:
-
PROP_DURABILITY_WAL_ENABLED
- See Also:
-
PROP_DURABILITY_WAL_FILE
- See Also:
-
PROP_DURABILITY_CHECKPOINT_INTERVAL
- See Also:
-
PROP_PERSISTENCE_AUTO_SAVE
- See Also:
-
PROP_PERSISTENCE_SAVE_INTERVAL_SECONDS
- See Also:
-
PROP_LOGGING_LEVEL
- See Also:
-
PROP_TASKS_AUTOSTART
- See Also:
-
PROP_QUERY_HISTORY_SIZE
- See Also:
-
PROP_QUERY_RESULT_CACHE_SIZE
- See Also:
-
PROP_STAGE_S3_LOCAL_ROOT
- See Also:
-
PROP_STAGE_FILE_URL_ENABLED
Opt-in forfile://(and bare local-path) stage URLs, which a real account refuses.- See Also:
-
PROP_STAGE_S3_LOCAL_MAPPINGS
- See Also:
-
PROP_STAGE_INTERNAL_LOCAL_ROOT
- See Also:
-
PROP_PYTHON_VENV
- See Also:
-
-
Constructor Details
-
EngineConfig
public EngineConfig() -
EngineConfig
-
EngineConfig
Configuration with explicit programmatic overrides: the built-in defaults and any discoveredfrostlake.properties(classpath / working directory /~/.frostlake) load first, thenoverridesapply last and win. Used by thejdbc:frostlake:file:URL to pin persistence to the URL's directory regardless of ambient configuration, while ambient conveniences (e.g.python.venv, stage mappings) still apply.
-
-
Method Details
-
getHttpPort
public int getHttpPort() -
getHttpHost
-
getMaxConnections
public int getMaxConnections() -
getDefaultDatabase
-
getDefaultSchema
-
getAccountId
The account LOCATOR, which CURRENT_ACCOUNT() answers with. -
getAccountName
The account NAME, which CURRENT_ACCOUNT_NAME() answers with — a different identifier from the locator: measured on a real account, CURRENT_ACCOUNT() is PG65914 while CURRENT_ACCOUNT_NAME() is WJ64893, and SHOW ACCOUNTS reports them in separate columns. -
getOrganizationName
The organization the account belongs to, which CURRENT_ORGANIZATION_NAME() answers with. -
isEnforcePrimaryKey
public boolean isEnforcePrimaryKey() -
isEnforceUniqueKey
public boolean isEnforceUniqueKey() -
isEnforceTypes
public boolean isEnforceTypes()When true (the default), DML coerces write values to the column type (VARCHAR(n) length enforcement, numeric-string parsing, rejecting clearly-incompatible values), matching Snowflake. Set false to opt out (lax typing). See docs/acid-snowflake-plan.md. -
isTimeTravelEnabled
public boolean isTimeTravelEnabled() -
isWindowFrameVectorsEnabled
public boolean isWindowFrameVectorsEnabled()When true (the default), window functions evaluate their argument once per partition row into a per-batch vector and every output row's frame reads that vector — instead of re-evaluating the argument for each frame row, which makes a running frame quadratic in expression walks. Only volatile-free argument shapes are vectorized (anything else keeps the row path); set false to force the per-frame-row path everywhere. -
isDeferredApply
public boolean isDeferredApply()When true (the default), DML buffers into a per-transaction write set and applies it on COMMIT (deferred apply), giving real atomicity + READ COMMITTED across INSERT/UPDATE/DELETE/MERGE. Set to false to use the legacy immediate-apply + undo-log path. See docs/acid-snowflake-plan.md. -
isStageFileUrlEnabled
public boolean isStageFileUrlEnabled()When true,CREATE STAGEacceptsfile://(and bare local-path) URLs backed by the local filesystem — the local-development affordance. Off by default: a real account refuses those URLs, and the default surface matches it. -
isRemoveCommandEnabled
public boolean isRemoveCommandEnabled()When true, the destructiveREMOVE/RM @stagecommand (which deletes the files backing a stage on the local filesystem) is allowed. Off by default as a safety guard against accidental data loss; enable viacommand.removeEnabled=true. -
getRegion
-
getDefaultUser
-
isInMemoryStorage
public boolean isInMemoryStorage() -
getLoggingLevel
-
isPersistenceEnabled
public boolean isPersistenceEnabled() -
isTaskSchedulerAutoStart
public boolean isTaskSchedulerAutoStart()Whether the engine arms the task scheduler as it finishes starting, so tasks left in the STARTED state — typically by a restore, since that writes the state without arming anything — begin firing on their schedule again.Default FALSE, because starting it is not free and not always wanted: it spawns timer threads, and task bodies start executing against restored data as soon as the engine is up, before anyone has looked at the instance. An embedded engine inside someone else's process should generally leave this alone and call
startTaskScheduler()when it is ready; a long-running server that is expected to pick up where it left off across restarts is what the flag is for.Turning it off does not stop tasks from running —
ALTER TASK … RESUMEstill starts the scheduler by itself. It only decides whether ALREADY-resumed tasks are armed at boot. -
getPersistenceDirectory
-
isWalEnabled
public boolean isWalEnabled()When true, committed mutating statements are appended to a write-ahead log (fsync on commit) and replayed on startup, so committed work survives a crash. Off by default — durability matters least for the in-memory local/CI-testing use case. See docs/acid-snowflake-plan.md. -
getWalFile
-
getWalCheckpointInterval
public int getWalCheckpointInterval()When > 0 and the WAL is enabled, the engine writes a checkpoint (a full state snapshot plus log truncation) after this many committed transactions, bounding the log's growth and speeding recovery. 0 (the default) disables automatic checkpointing —DatabaseEngine.checkpoint()can still be called explicitly. See docs/acid-snowflake-plan.md. -
isAutoSaveEnabled
public boolean isAutoSaveEnabled() -
getSaveIntervalSeconds
public int getSaveIntervalSeconds() -
getQueryHistorySize
public int getQueryHistorySize() -
getQueryResultCacheSize
public int getQueryResultCacheSize() -
getStageS3LocalRoot
Local filesystem base for resolvings3://bucket/keyreferences (an unmapped key resolves to<root>/bucket/key). Lets JARs that live in S3-backed stages in production be loaded from local disk for local/CI testing. Defaults to~/.frostlake_stages/s3. SeeS3PathResolver. -
getStageInternalLocalRoot
Local filesystem root backing the implicit internal stages — the user stage (@~) and per-table stages (@%table), which have noCREATE STAGE/ URL. User stages resolve to<root>/users/<user>, table stages to<root>/tables/<db.schema.table>. Defaults to~/.frostlake_stages/internal. -
getStageS3LocalMappings
Explicits3://-prefix → local-directory overrides for S3 resolution:';'-separateds3prefix=localdirpairs (longest matching prefix wins). Empty by default. SeeS3PathResolver. -
getPythonVenv
A GraalPy virtual environment whose installed packages (numpy, pandas, ...) become importable from Python UDF/procedure handlers — the local stand-in for Snowflake'sPACKAGES=(...)clause. Points at the venv directory produced by the graalpy-maven-plugin (<externalDirectory>/venv); empty (the default) leaves the embedded interpreter on its standard library only. -
getProperty
-
getIntProperty
-
getBooleanProperty
-
setProperty
-
getProperties
-