Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ray6080 committed Jul 24, 2023
1 parent c44255c commit 0477f05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/processor/operator/copy/read_parquet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ std::shared_ptr<arrow::RecordBatch> ReadParquet::readTuples(
std::unique_ptr<ReadFileMorsel> morsel) {
assert(!morsel->filePath.empty());
if (!reader || filePath != morsel->filePath) {
reader = storage::TableCopyUtils::createParquetReader(
reader = TableCopyUtils::createParquetReader(
morsel->filePath, sharedState->tableSchema);
filePath = morsel->filePath;
}
std::shared_ptr<arrow::Table> table;
storage::TableCopyUtils::throwCopyExceptionIfNotOK(
TableCopyUtils::throwCopyExceptionIfNotOK(
reader->RowGroup(static_cast<int>(morsel->blockIdx))->ReadTable(&table));
arrow::TableBatchReader batchReader(*table);
std::shared_ptr<arrow::RecordBatch> recordBatch;
storage::TableCopyUtils::throwCopyExceptionIfNotOK(batchReader.ReadNext(&recordBatch));
TableCopyUtils::throwCopyExceptionIfNotOK(batchReader.ReadNext(&recordBatch));
return recordBatch;
}

Expand Down

0 comments on commit 0477f05

Please sign in to comment.