Package dev.frostlake.metastore.model
Class DefaultValueExpression
java.lang.Object
dev.frostlake.metastore.model.DefaultValueExpression
A column
DEFAULT whose value is a non-literal expression (arithmetic, string
concatenation, a function call, CASE, …) rather than a stored constant. It holds the raw expression
text and is evaluated once per inserted row at INSERT time — not stored verbatim as the column value.
This wrapper exists to disambiguate an expression default from a literal string default: both would
otherwise be a bare String on TableColumn.defaultValue, so a DEFAULT (1+2) was
previously inserted as the text "1+2" instead of 3. A literal default stays its plain
value; only expression defaults are wrapped. toString() returns the expression text so metadata
views (SHOW COLUMNS, INFORMATION_SCHEMA, snapshots) render the original expression.
-
Constructor Summary
Constructors -
Method Summary