Class SessionTimestampMapping
TIMESTAMP means, which the session's TIMESTAMP_TYPE_MAPPING parameter
names.
Live resolves the bare word against whatever the mapping says AT THE MOMENT it is written, on
every spelling that can carry it — CAST(x AS TIMESTAMP), x::TIMESTAMP,
TO_TIMESTAMP(x) and a column declared TIMESTAMP. It is resolved ONCE and kept: a
column created under TIMESTAMP_LTZ still describes as TIMESTAMP_LTZ after the session switches back.
DATETIME does NOT follow it. It is an alias for TIMESTAMP_NTZ specifically, not for the mapped TIMESTAMP, and stays NTZ under every mapping — measured on both engines. The three explicit spellings are likewise untouched; only the bare word is unresolved.
Held in a ThreadLocal pinned for the statement, the same way SessionZone carries the
session's zone into the value layer, and for the same reason: one engine serves many sessions.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcurrent()The flavour a bare TIMESTAMP currently means.static booleanisZoned()Whether the mapping names a zone-carrying flavour, which is the only case that changes anything.static StringPin this statement's mapping, returning what was pinned before so the caller can restore it.static voidPut back whateverpin(java.lang.Object)displaced; a null restores the unpinned state.
-
Field Details
-
DEFAULT
What a bare TIMESTAMP means when nothing has set the parameter.- See Also:
-
-
Method Details
-
current
The flavour a bare TIMESTAMP currently means. -
isZoned
public static boolean isZoned()Whether the mapping names a zone-carrying flavour, which is the only case that changes anything. -
pin
Pin this statement's mapping, returning what was pinned before so the caller can restore it. The value is validated where it is SET, so an unrecognised one simply falls back to the default. -
restore
Put back whateverpin(java.lang.Object)displaced; a null restores the unpinned state.
-