Skip to content

Commit

Permalink
refactor arrow reader to parquet reader in MetadataTest.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
jkhaliqi committed Nov 7, 2024
1 parent 327fa89 commit 4af254d
Show file tree
Hide file tree
Showing 3 changed files with 881 additions and 0 deletions.
8 changes: 8 additions & 0 deletions velox/dwio/parquet/reader/ParquetReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ class ReaderBase {
return *fileMetaData_;
}

std::shared_ptr<thrift::FileMetaData> thriftFileMetaDatas() const {
return std::make_shared<thrift::FileMetaData>(*fileMetaData_);
}

FileMetaDataPtr fileMetaData() const {
return FileMetaDataPtr(reinterpret_cast<const void*>(fileMetaData_.get()));
}
Expand Down Expand Up @@ -1166,4 +1170,8 @@ FileMetaDataPtr ParquetReader::fileMetaData() const {
return readerBase_->fileMetaData();
}

std::shared_ptr<thrift::FileMetaData> ParquetReader::thriftFileMetaData() const {
return readerBase_->thriftFileMetaDatas();
}

} // namespace facebook::velox::parquet
2 changes: 2 additions & 0 deletions velox/dwio/parquet/reader/ParquetReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ class ParquetReader : public dwio::common::Reader {

FileMetaDataPtr fileMetaData() const;

std::shared_ptr<thrift::FileMetaData> thriftFileMetaData() const;

private:
std::shared_ptr<ReaderBase> readerBase_;
};
Expand Down
Loading

0 comments on commit 4af254d

Please sign in to comment.