Package dev.frostlake.executor.copy
Class CsvColumnCountException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.frostlake.executor.copy.CsvColumnCountException
- All Implemented Interfaces:
Serializable
A staged CSV record whose field count does not match the target table's column count, rejected by
ERROR_ON_COLUMN_COUNT_MISMATCH (see
CopyCommandExecutor.requireCsvColumnCount for the rule and the live evidence behind it).
It carries its own first_error geometry rather than letting the generic CSV error describer
work it out: the record is rejected BEFORE a row is ever built, so there is no built row to re-check
column by column, and the position the account reports is not the offending field's start — for the two
"record ran out" shapes it is the position just PAST the record, which is off the end of the field list
entirely.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCsvColumnCountException(String message, int line, Integer character, String columnName) -
Method Summary
Modifier and TypeMethodDescriptionThe 1-based character offset within the reported line."TABLE"["COLUMN":ordinal], or"TABLE"[ordinal]when no such column exists.intgetLine()The 1-based PHYSICAL line the account reports — NOT always the offending record's own line.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CsvColumnCountException
-
-
Method Details
-
getLine
public int getLine()The 1-based PHYSICAL line the account reports — NOT always the offending record's own line. A mismatch on the file's first data record is reported at the position just past that record, which the account renders as the start of the FOLLOWING line when there is one. -
getCharacter
The 1-based character offset within the reported line. -
getColumnName
"TABLE"["COLUMN":ordinal], or"TABLE"[ordinal]when no such column exists.
-