net.snowflake.ingest.streaming.internal.RowBuffer Maven / Gradle / Ivy
/*
* Copyright (c) 2022 Snowflake Computing Inc. All rights reserved.
*/
package net.snowflake.ingest.streaming.internal;
import java.util.List;
import java.util.Map;
import net.snowflake.ingest.streaming.InsertValidationResponse;
/**
* Interface for the buffer in the Streaming Ingest channel that holds the un-flushed rows, these
* rows will be converted to the underlying format implementation for faster processing
*
* @param type of column data ({@link ParquetChunkData})
*/
interface RowBuffer {
/**
* Set up the column fields and vectors using the column metadata from the server
*
* @param columns list of column metadata
*/
void setupSchema(List columns);
/**
* Insert a batch of rows into the row buffer
*
* @param rows input row
* @param startOffsetToken start offset token of the batch
* @param endOffsetToken offset token of the latest row in the batch
* @return insert response that possibly contains errors because of insertion failures
*/
InsertValidationResponse insertRows(
Iterable