Class CsvPartitionColumnParser
java.lang.Object
com.illumon.iris.importers.csv.parsers.CsvPartitionColumnParser
- All Implemented Interfaces:
io.deephaven.csv.parsers.Parser<String[]>
public class CsvPartitionColumnParser extends Object implements io.deephaven.csv.parsers.Parser<String[]>
The parser will be used for the partition column when the schema has a partition column defined.
The primary partition observer will listen to the Parser updates and will publish the parser updates to
other columns in table. Note the parser will not write the updates to a Sink (A partition column will not be
persisted with the other columns in the table).
-
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
-
Method Summary
Modifier and Type Method Description static CsvPartitionColumnParser
make(PartitionUpdatesObserver primaryObserver, AppendableColumnSink<String,String[]> columnWrapper)
Used to create the partition column parser, when the schema has a partition column.io.deephaven.csv.parsers.Parser.ParserContext<String[]>
makeParserContext(io.deephaven.csv.parsers.Parser.GlobalContext gctx, int chunkSize)
void
parseChunkUpdate(int size, long destEnd)
The chunk updates are received by registering to AppendableColumn in the source.long
tryParse(io.deephaven.csv.parsers.Parser.GlobalContext gctx, io.deephaven.csv.parsers.Parser.ParserContext<String[]> pctx, io.deephaven.csv.parsers.IteratorHolder ih, long begin, long end, boolean appending)
-
Method Details
-
make
public static CsvPartitionColumnParser make(@NotNull PartitionUpdatesObserver primaryObserver, @NotNull AppendableColumnSink<String,String[]> columnWrapper)Used to create the partition column parser, when the schema has a partition column.- Parameters:
primaryObserver
- The observer that would observe the parsers partition update, and then delegate as it deems necessary.columnWrapper
- The partition column sink- Returns:
- The PartitionColumnParser.
-
makeParserContext
@NotNull public io.deephaven.csv.parsers.Parser.ParserContext<String[]> makeParserContext(io.deephaven.csv.parsers.Parser.GlobalContext gctx, int chunkSize)- Specified by:
makeParserContext
in interfaceio.deephaven.csv.parsers.Parser<String[]>
-
tryParse
public long tryParse(io.deephaven.csv.parsers.Parser.GlobalContext gctx, io.deephaven.csv.parsers.Parser.ParserContext<String[]> pctx, io.deephaven.csv.parsers.IteratorHolder ih, long begin, long end, boolean appending) throws io.deephaven.csv.util.CsvReaderException- Specified by:
tryParse
in interfaceio.deephaven.csv.parsers.Parser<String[]>
- Throws:
io.deephaven.csv.util.CsvReaderException
-
parseChunkUpdate
public void parseChunkUpdate(int size, long destEnd)The chunk updates are received by registering to AppendableColumn in the source. This approach should be used when the partition column is not in the source file.- Parameters:
size
- The length of the updatedestEnd
- The passed-down destination End parameter of the update
-