Skip to content

Commit

Permalink
Rename tableStorageFormat in HiveInsertTableHandle
Browse files Browse the repository at this point in the history
Each partition can have its own storage format, the format info in
HiveInsertTableHandle is not necessarily table format
  • Loading branch information
kewang1024 committed Nov 6, 2024
1 parent c3023b6 commit 020c952
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions velox/connectors/hive/HiveDataSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,15 @@ class HiveInsertTableHandle : public ConnectorInsertTableHandle {
HiveInsertTableHandle(
std::vector<std::shared_ptr<const HiveColumnHandle>> inputColumns,
std::shared_ptr<const LocationHandle> locationHandle,
dwio::common::FileFormat tableStorageFormat =
dwio::common::FileFormat::DWRF,
dwio::common::FileFormat storageFormat = dwio::common::FileFormat::DWRF,
std::shared_ptr<const HiveBucketProperty> bucketProperty = nullptr,
std::optional<common::CompressionKind> compressionKind = {},
const std::unordered_map<std::string, std::string>& serdeParameters = {},
const std::shared_ptr<dwio::common::WriterOptions>& writerOptions =
nullptr)
: inputColumns_(std::move(inputColumns)),
locationHandle_(std::move(locationHandle)),
tableStorageFormat_(tableStorageFormat),
storageFormat_(storageFormat),
bucketProperty_(std::move(bucketProperty)),
compressionKind_(compressionKind),
serdeParameters_(serdeParameters),
Expand All @@ -237,8 +236,8 @@ class HiveInsertTableHandle : public ConnectorInsertTableHandle {
return compressionKind_;
}

dwio::common::FileFormat tableStorageFormat() const {
return tableStorageFormat_;
dwio::common::FileFormat storageFormat() const {
return storageFormat_;
}

const std::unordered_map<std::string, std::string>& serdeParameters() const {
Expand Down Expand Up @@ -272,7 +271,7 @@ class HiveInsertTableHandle : public ConnectorInsertTableHandle {
private:
const std::vector<std::shared_ptr<const HiveColumnHandle>> inputColumns_;
const std::shared_ptr<const LocationHandle> locationHandle_;
const dwio::common::FileFormat tableStorageFormat_;
const dwio::common::FileFormat storageFormat_;
const std::shared_ptr<const HiveBucketProperty> bucketProperty_;
const std::optional<common::CompressionKind> compressionKind_;
const std::unordered_map<std::string, std::string> serdeParameters_;
Expand Down

0 comments on commit 020c952

Please sign in to comment.