Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VL] remove redundant code in parquet datasource to avoid memory leakage PR6430 #6462

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions cpp/velox/operators/writer/VeloxParquetDatasource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ void VeloxParquetDatasource::initSink(const std::unordered_map<std::string, std:

void VeloxParquetDatasource::init(const std::unordered_map<std::string, std::string>& sparkConfs) {
initSink(sparkConfs);
ArrowSchema cSchema{};
arrow::Status status = arrow::ExportSchema(*(schema_.get()), &cSchema);
if (!status.ok()) {
throw std::runtime_error("Failed to export arrow cSchema.");
}

type_ = velox::importFromArrow(cSchema);

if (sparkConfs.find(kParquetBlockSize) != sparkConfs.end()) {
maxRowGroupBytes_ = static_cast<int64_t>(stoi(sparkConfs.find(kParquetBlockSize)->second));
Expand Down
1 change: 0 additions & 1 deletion cpp/velox/operators/writer/VeloxParquetDatasource.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class VeloxParquetDatasource : public Datasource {
int64_t maxRowGroupRows_ = 100000000; // 100M

std::shared_ptr<arrow::Schema> schema_;
std::shared_ptr<const facebook::velox::Type> type_;
std::shared_ptr<facebook::velox::parquet::Writer> parquetWriter_;
std::shared_ptr<facebook::velox::memory::MemoryPool> pool_;
};
Expand Down
Loading