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 7bcdae2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion velox/connectors/hive/HiveDataSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ void HiveInsertTableHandle::registerSerDe() {
std::string HiveInsertTableHandle::toString() const {
std::ostringstream out;
out << "HiveInsertTableHandle ["
<< dwio::common::toString(tableStorageFormat_);
<< dwio::common::toString(storageFormat_);
if (compressionKind_.has_value()) {
out << " " << common::compressionKindToString(compressionKind_.value());
} else {
Expand Down
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 7bcdae2

Please sign in to comment.