Skip to main content

check_bulk_insert_batch

Function check_bulk_insert_batch 

Source
pub fn check_bulk_insert_batch(
    metadata: &RegionMetadata,
    batch: &RecordBatch,
) -> Result<bool>
Expand description

Checks the batch of a bulk insert against the region schema with the rules WriteRequest::check_schema applies to rows: column names are unique, every column is a column of the region with its Arrow type and contains nulls only if the region column is nullable, and a missing column is nullable or has a default value. Tags may use any string encoding. Sparse batches must carry the tags in one encoded primary key column. Companion tag columns (for example, __table_id for partition expressions) are allowed and checked against the region schema; the encoded key remains authoritative for storage. Returns whether the batch misses columns that the writer fills.