Package dev.frostlake.executor
Class ColumnLengthException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.frostlake.executor.ColumnLengthException
- All Implemented Interfaces:
Serializable
A value too long for its
VARCHAR(n) column, rejected on the write path.
It exists because Snowflake words this ONE violation two different ways depending on which path hit it,
and the check itself is shared. Live-verified on a real account, the same over-long value
against the same VARCHAR(3) column:
- DML — INSERT,
INSERT … SELECT, UPDATE and MERGE all reportedString 'abcdefgh' is too long and would be truncated, which is whatThrowable.getMessage()returns; - COPY — the per-file result's
first_errorreportedUser character length limit (3) exceeded by string 'abcdefgh'instead.
getLimit() and getValue() while every DML caller reads the message as-is. Two other
write violations were probed the same way and turned out NOT to differ — a NOT NULL breach is
NULL result in a non-nullable column and a bad numeric is
Numeric value 'BADX' is not recognized on both paths — so only this one needs splitting.
The DML wording is the one the plain message carries because Snowflake nests it in a per-statement
envelope (DML operation to table E1 failed on column NAME with error: …) that names the table and
column separately. Frostlake does not build that envelope, which is a distinct gap from this one.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnLengthExceptionThe same violation for a BINARY column, which live words by the family:Binary value '0AFF' is too long and would be truncated, the bytes spelled as upper-case hex whatever they were written as.intgetLimit()The column's declared maximum length.getValue()The offending value, in full — Snowflake quotes the whole string, not a truncation of it.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ColumnLengthException
-
-
Method Details
-
forBinary
The same violation for a BINARY column, which live words by the family:Binary value '0AFF' is too long and would be truncated, the bytes spelled as upper-case hex whatever they were written as.- Parameters:
limit- the column's declared width in byteshex- the offending value as upper-case hex- Returns:
- the exception the DML envelope then wraps
-
getLimit
public int getLimit()The column's declared maximum length. -
getValue
The offending value, in full — Snowflake quotes the whole string, not a truncation of it.
-