yma11 commented on code in PR #4779:
URL: https://github.com/apache/incubator-gluten/pull/4779#discussion_r1522324972


##########
cpp/velox/compute/WholeStageResultIterator.cc:
##########
@@ -152,8 +152,28 @@ WholeStageResultIterator::WholeStageResultIterator(
       auto partitionColumn = partitionColumns[idx];
       std::unordered_map<std::string, std::optional<std::string>> 
partitionKeys;
       constructPartitionColumns(partitionKeys, partitionColumn);
-      auto split = 
std::make_shared<velox::connector::hive::HiveConnectorSplit>(
-          kHiveConnectorId, paths[idx], format, starts[idx], lengths[idx], 
partitionKeys);
+      std::shared_ptr<velox::connector::ConnectorSplit> split;
+      if (auto icebergSplitInfo = 
std::dynamic_pointer_cast<IcebergSplitInfo>(scanInfo)) {
+        // Set Iceberg split.
+        std::unordered_map<std::string, std::string> 
customSplitInfo{{"table_format", "hive-iceberg"}};
+        auto deleteFilesFind = 
icebergSplitInfo->deleteFilesMap.find(paths[idx]);
+        auto deleteFiles = deleteFilesFind != 
icebergSplitInfo->deleteFilesMap.end() ? deleteFilesFind->second

Review Comment:
   Yeah. `scanInfo` will have a list of `SplitInfo` and each `SplitInfo` 
contains its own `path`, `start`, `length` as well as a list of `deleteFiles` 
which may be empty. I think it will be clear in conception and without using 
`idx` anywhere. `Spark-delta` has a similar structure called `AddFile` which 
organizes like this. It's okay to merge this PR first and we do it as a follow 
up.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to