jinchengchenghh commented on code in PR #10585:
URL: 
https://github.com/apache/incubator-gluten/pull/10585#discussion_r2319250500


##########
cpp/velox/compute/VeloxBackend.cc:
##########
@@ -294,15 +293,24 @@ void VeloxBackend::initCache() {
 }
 
 void VeloxBackend::initConnector(const 
std::shared_ptr<velox::config::ConfigBase>& hiveConf) {

Review Comment:
   Should we move the function to WholeStageResultIterator?



##########
cpp/velox/compute/VeloxBackend.cc:
##########
@@ -91,8 +91,8 @@ void veloxRuntimeReleaser(Runtime* runtime) {
 void VeloxBackend::init(
     std::unique_ptr<AllocationListener> listener,
     const std::unordered_map<std::string, std::string>& conf) {
-  backendConf_ =
-      
std::make_shared<facebook::velox::config::ConfigBase>(std::unordered_map<std::string,
 std::string>(conf));
+  backendConf_ = std::make_shared<facebook::velox::config::ConfigBase>(

Review Comment:
   Could we generate the HiveConfig by veloxCfg_ in WholeStageResultIterator 
every time?



##########
cpp/velox/compute/VeloxBackend.cc:
##########
@@ -91,8 +91,8 @@ void veloxRuntimeReleaser(Runtime* runtime) {
 void VeloxBackend::init(
     std::unique_ptr<AllocationListener> listener,
     const std::unordered_map<std::string, std::string>& conf) {
-  backendConf_ =
-      
std::make_shared<facebook::velox::config::ConfigBase>(std::unordered_map<std::string,
 std::string>(conf));
+  backendConf_ = std::make_shared<facebook::velox::config::ConfigBase>(

Review Comment:
   mutable true make copy the configs when iterating the configs



##########
cpp/velox/compute/WholeStageResultIterator.cc:
##########
@@ -102,6 +103,10 @@ WholeStageResultIterator::WholeStageResultIterator(
   fileSystem->mkdir(spillDir);
   task_->setSpillDirectory(spillDir);
 
+  // register the hive connectors
+  std::call_once(

Review Comment:
   In what case, we may register twice?



-- 
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