public void ReadNewRecordBatch(RecordBatch recordBatch) { //Dispose the previous batch _currentBatch?.Dispose(); _currentBatch = recordBatch; _currentIndex = -1; for (int i = 0; i < _columnDecoders.Count; i++) { _columnDecoders[i].NewBatch(recordBatch.Column(i)); } }
public void TestRecordBatchBasics() { RecordBatch recordBatch = TestData.CreateSampleRecordBatch(length: 1); Assert.Throws <ArgumentOutOfRangeException>(() => new RecordBatch(recordBatch.Schema, recordBatch.Arrays, -1)); var col1 = recordBatch.Column(0); var col2 = recordBatch.Column("list0"); ArrowReaderVerifier.CompareArrays(col1, col2); recordBatch.Dispose(); }