Class CsvDBDateTimeParser
java.lang.Object
com.illumon.iris.importers.csv.parsers.CsvObjectParserBase<DBDateTime,DBDateTime[]>
com.illumon.iris.importers.csv.parsers.CsvDBDateTimeParser
- All Implemented Interfaces:
io.deephaven.csv.parsers.Parser<DBDateTime[]>
public class CsvDBDateTimeParser extends CsvObjectParserBase<DBDateTime,DBDateTime[]>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.csv.parsers.Parser
io.deephaven.csv.parsers.Parser.GlobalContext, io.deephaven.csv.parsers.Parser.ParserContext<TARRAY extends Object>
-
Field Summary
Fields Modifier and Type Field Description protected boolean
applyTransform
protected AppendableColumnSink<TYPE,TARRAY>
columnSink
protected ImportColumnDataTransformer
dataTransformer
protected static int
INITIAL_TRANSFORM_BUFFER_SIZE
protected CsvParserContext
parserContext
protected char[]
transformBuffer
-
Method Summary
Modifier and Type Method Description protected DBDateTime
getCurrentValue(String bufferValue)
protected int
getLength(DBDateTime[] values)
protected char[]
getTransformData(io.deephaven.csv.parsers.IteratorHolder ih)
Method to update reusable transform bufferio.deephaven.csv.parsers.Parser.ParserContext<DBDateTime[]>
makeParserContext(io.deephaven.csv.parsers.Parser.GlobalContext gctx, int chunkSize)
protected boolean
suppressErrorAndUpdateWithDefault(long rowNum, boolean isNull, TARRAY values, int chunkIndex)
On null or error conditions verifies if allowed error count is exhausted by considering strict and failDefault attributes.protected boolean
tryUpdateWithDefault(DBDateTime[] values, int chunkIndex)
Implementations should update with default value at the current position.protected void
updateCurrentValue(DBDateTime[] values, DBDateTime currentValue, int chunkIndex)
-
Field Details
-
INITIAL_TRANSFORM_BUFFER_SIZE
protected static final int INITIAL_TRANSFORM_BUFFER_SIZE- See Also:
- Constant Field Values
-
columnSink
-
dataTransformer
-
parserContext
-
applyTransform
protected final boolean applyTransform -
transformBuffer
protected char[] transformBuffer
-
-
Method Details
-
makeParserContext
@NotNull public io.deephaven.csv.parsers.Parser.ParserContext<DBDateTime[]> makeParserContext(@NotNull io.deephaven.csv.parsers.Parser.GlobalContext gctx, int chunkSize) -
getCurrentValue
protected DBDateTime getCurrentValue(@NotNull String bufferValue) throws InputMismatchException, NumberFormatException- Specified by:
getCurrentValue
in classCsvObjectParserBase<DBDateTime,DBDateTime[]>
- Throws:
InputMismatchException
NumberFormatException
-
updateCurrentValue
protected void updateCurrentValue(@NotNull DBDateTime[] values, @Nullable DBDateTime currentValue, int chunkIndex)- Specified by:
updateCurrentValue
in classCsvObjectParserBase<DBDateTime,DBDateTime[]>
-
tryUpdateWithDefault
Implementations should update with default value at the current position.- Parameters:
values
- The current values bufferchunkIndex
- The current position to update on values buffer- Returns:
- true if successfully updated with supplied default value
-
getLength
- Specified by:
getLength
in classCsvObjectParserBase<DBDateTime,DBDateTime[]>
-
getTransformData
@NotNull protected char[] getTransformData(@NotNull io.deephaven.csv.parsers.IteratorHolder ih)Method to update reusable transform buffer -
suppressErrorAndUpdateWithDefault
protected boolean suppressErrorAndUpdateWithDefault(long rowNum, boolean isNull, @NotNull TARRAY values, int chunkIndex) throws io.deephaven.csv.util.CsvReaderExceptionOn null or error conditions verifies if allowed error count is exhausted by considering strict and failDefault attributes. Updates with default value if applicable.- Parameters:
rowNum
- The current row for entire importisNull
- Indicates if this was invoked for a null value cellvalues
- The current values bufferchunkIndex
- The current position to update on values buffer- Returns:
- true if successfully updated with supplied default value
- Throws:
io.deephaven.csv.util.CsvReaderException
- when exceeds max error count.
-