Skip to content
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
2 changes: 1 addition & 1 deletion cpp/velox/operators/writer/VeloxParquetDataSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace gluten {

void VeloxParquetDataSource::initSink(const std::unordered_map<std::string, std::string>& /* sparkConfs */) {
if (strncmp(filePath_.c_str(), "file:", 5) == 0) {
sink_ = dwio::common::FileSink::create(filePath_, {.pool = pool_.get()});
sink_ = dwio::common::FileSink::create(filePath_, {.pool = sinkPool_.get()});
} else {
throw std::runtime_error("The file path is not local when writing data with parquet format in velox runtime!");
}
Expand Down
6 changes: 5 additions & 1 deletion cpp/velox/operators/writer/VeloxParquetDataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ class VeloxParquetDataSource : public VeloxDataSource {
std::shared_ptr<facebook::velox::memory::MemoryPool> veloxPool,
std::shared_ptr<facebook::velox::memory::MemoryPool> sinkPool,
std::shared_ptr<arrow::Schema> schema)
: VeloxDataSource(filePath, schema), filePath_(filePath), schema_(schema), pool_(std::move(veloxPool)) {}
: VeloxDataSource(filePath, schema),
filePath_(filePath),
sinkPool_(std::move(sinkPool)),
schema_(schema),
pool_(std::move(veloxPool)) {}

void init(const std::unordered_map<std::string, std::string>& sparkConfs) override;
virtual void initSink(const std::unordered_map<std::string, std::string>& sparkConfs);
Expand Down