Skip to content

Commit

Permalink
Fix write to Nimble table in HiveConnector (facebookincubator#10941)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookincubator#10941

Recent refactor facebookincubator#10915
breaks the capability to write to Nimble table in Hive connector, fix it.

Reviewed By: xiaoxmeng

Differential Revision: D62302602
  • Loading branch information
Yuhta authored and facebook-github-bot committed Sep 6, 2024
1 parent 9886e1c commit 19fd440
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions velox/connectors/hive/HiveConnectorUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,12 +993,20 @@ void updateWriterOptionsFromHiveConfig(
const std::shared_ptr<const HiveConfig>& hiveConfig,
const config::ConfigBase* sessionProperties,
std::shared_ptr<dwio::common::WriterOptions>& writerOptions) {
if (fileFormat == dwio::common::FileFormat::PARQUET) {
switch (fileFormat) {
case dwio::common::FileFormat::DWRF:
updateDWRFWriterOptions(hiveConfig, sessionProperties, writerOptions);
break;
#ifdef VELOX_ENABLE_PARQUET
updateParquetWriterOptions(hiveConfig, sessionProperties, writerOptions);
case dwio::common::FileFormat::PARQUET:
updateParquetWriterOptions(hiveConfig, sessionProperties, writerOptions);
break;
#endif
} else {
updateDWRFWriterOptions(hiveConfig, sessionProperties, writerOptions);
case dwio::common::FileFormat::NIMBLE:
// No-op for now.
break;
default:
VELOX_UNSUPPORTED("{}", fileFormat);
}
}

Expand Down

0 comments on commit 19fd440

Please sign in to comment.