diff --git a/velox/connectors/hive/HiveConnectorUtil.cpp b/velox/connectors/hive/HiveConnectorUtil.cpp index 93a15cfdfbce..c43eecd31fc6 100644 --- a/velox/connectors/hive/HiveConnectorUtil.cpp +++ b/velox/connectors/hive/HiveConnectorUtil.cpp @@ -448,6 +448,7 @@ void configureReaderOptions( const RowTypePtr& fileSchema, const std::shared_ptr& hiveSplit, const std::unordered_map& tableParameters) { + readerOptions.setLoadQuantum(hiveConfig->loadQuantum()); readerOptions.setMaxCoalesceBytes(hiveConfig->maxCoalescedBytes()); readerOptions.setMaxCoalesceDistance(hiveConfig->maxCoalescedDistanceBytes()); readerOptions.setFileColumnNamesReadAsLowerCase( diff --git a/velox/connectors/hive/tests/HiveConnectorUtilTest.cpp b/velox/connectors/hive/tests/HiveConnectorUtilTest.cpp index 84c5b28f6b82..8f4ae79cac68 100644 --- a/velox/connectors/hive/tests/HiveConnectorUtilTest.cpp +++ b/velox/connectors/hive/tests/HiveConnectorUtilTest.cpp @@ -101,6 +101,7 @@ TEST_F(HiveConnectorUtilTest, configureReaderOptions) { EXPECT_EQ(readerOptions.getFileFormat(), fileFormat); EXPECT_TRUE( compareSerDeOptions(readerOptions.getSerDeOptions(), expectedSerDe)); + EXPECT_EQ(readerOptions.loadQuantum(), hiveConfig->loadQuantum()); EXPECT_EQ(readerOptions.maxCoalesceBytes(), hiveConfig->maxCoalescedBytes()); EXPECT_EQ( readerOptions.maxCoalesceDistance(), @@ -174,6 +175,7 @@ TEST_F(HiveConnectorUtilTest, configureReaderOptions) { // Tests other custom reader options. clearDynamicParameters(FileFormat::TEXT); std::unordered_map customHiveConfigProps; + customHiveConfigProps[hive::HiveConfig::kLoadQuantum] = "321"; customHiveConfigProps[hive::HiveConfig::kMaxCoalescedBytes] = "129"; customHiveConfigProps[hive::HiveConfig::kMaxCoalescedDistanceBytes] = "513"; customHiveConfigProps[hive::HiveConfig::kFileColumnNamesReadAsLowerCase] = @@ -184,6 +186,7 @@ TEST_F(HiveConnectorUtilTest, configureReaderOptions) { hiveConfig = std::make_shared( std::make_shared(customHiveConfigProps)); performConfigure(); + EXPECT_EQ(readerOptions.loadQuantum(), hiveConfig->loadQuantum()); EXPECT_EQ(readerOptions.maxCoalesceBytes(), hiveConfig->maxCoalescedBytes()); EXPECT_EQ( readerOptions.maxCoalesceDistance(),