This is an automated email from the ASF dual-hosted git repository.

rui pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 7d4bc3654d [VL] Minor fix for cpp code style (part 2) (#8210)
7d4bc3654d is described below

commit 7d4bc3654d261980bb59325922d20de3a5118cdf
Author: Rui Mo <[email protected]>
AuthorDate: Thu Dec 12 15:24:49 2024 +0800

    [VL] Minor fix for cpp code style (part 2) (#8210)
    
    Rename functions with number suffix to avoid miss-reading.
---
 cpp/core/compute/Runtime.cc                        |  3 +-
 cpp/core/utils/ObjectStore.cc                      |  2 +-
 cpp/core/utils/ObjectStore.h                       |  8 ++---
 cpp/velox/jni/JniFileSystem.cc                     | 10 +++----
 cpp/velox/memory/VeloxMemoryManager.cc             | 10 +++----
 cpp/velox/shuffle/VeloxSortShuffleWriter.cc        | 13 +++++----
 cpp/velox/shuffle/VeloxSortShuffleWriter.h         |  2 +-
 cpp/velox/substrait/SubstraitToVeloxPlan.cc        |  2 +-
 .../substrait/SubstraitToVeloxPlanValidator.cc     | 34 +++++++++++-----------
 .../substrait/SubstraitToVeloxPlanValidator.h      |  4 +--
 cpp/velox/udf/UdfLoader.cc                         |  4 +--
 cpp/velox/udf/UdfLoader.h                          |  2 +-
 12 files changed, 49 insertions(+), 45 deletions(-)

diff --git a/cpp/core/compute/Runtime.cc b/cpp/core/compute/Runtime.cc
index f0ced89f9f..30b5668000 100644
--- a/cpp/core/compute/Runtime.cc
+++ b/cpp/core/compute/Runtime.cc
@@ -19,8 +19,8 @@
 #include "utils/Registry.h"
 
 namespace gluten {
-
 namespace {
+
 Registry<Runtime::Factory>& runtimeFactories() {
   static Registry<Runtime::Factory> registry;
   return registry;
@@ -29,6 +29,7 @@ Registry<Runtime::Releaser>& runtimeReleasers() {
   static Registry<Runtime::Releaser> registry;
   return registry;
 }
+
 } // namespace
 
 void Runtime::registerFactory(const std::string& kind, Runtime::Factory 
factory, Runtime::Releaser releaser) {
diff --git a/cpp/core/utils/ObjectStore.cc b/cpp/core/utils/ObjectStore.cc
index 82929a18dd..3eec544773 100644
--- a/cpp/core/utils/ObjectStore.cc
+++ b/cpp/core/utils/ObjectStore.cc
@@ -42,7 +42,7 @@ gluten::ObjectHandle 
gluten::ObjectStore::save(std::shared_ptr<void> obj) {
   return toObjHandle(handle);
 }
 
-void gluten::ObjectStore::release0(gluten::ResourceHandle handle) {
+void gluten::ObjectStore::releaseInternal(gluten::ResourceHandle handle) {
   const std::lock_guard<std::mutex> lock(mtx_);
   store_.erase(handle);
   aliveObjects_.erase(handle);
diff --git a/cpp/core/utils/ObjectStore.h b/cpp/core/utils/ObjectStore.h
index 5a38a1af33..03d1a470fd 100644
--- a/cpp/core/utils/ObjectStore.h
+++ b/cpp/core/utils/ObjectStore.h
@@ -53,7 +53,7 @@ class ObjectStore {
     ResourceHandle storeId = safeCast<ResourceHandle>(handle >> 
(sizeof(ResourceHandle) * 8));
     ResourceHandle resourceId = safeCast<ResourceHandle>(handle & 
std::numeric_limits<ResourceHandle>::max());
     auto store = stores().lookup(storeId);
-    store->release0(resourceId);
+    store->releaseInternal(resourceId);
   }
 
   template <typename T>
@@ -61,7 +61,7 @@ class ObjectStore {
     ResourceHandle storeId = safeCast<ResourceHandle>(handle >> 
(sizeof(ResourceHandle) * 8));
     ResourceHandle resourceId = safeCast<ResourceHandle>(handle & 
std::numeric_limits<ResourceHandle>::max());
     auto store = stores().lookup(storeId);
-    return store->retrieve0<T>(resourceId);
+    return store->retrieveInternal<T>(resourceId);
   }
 
   virtual ~ObjectStore();
@@ -82,7 +82,7 @@ class ObjectStore {
   }
 
   template <typename T>
-  std::shared_ptr<T> retrieve0(ResourceHandle handle) {
+  std::shared_ptr<T> retrieveInternal(ResourceHandle handle) {
     const std::lock_guard<std::mutex> lock(mtx_);
     std::shared_ptr<void> object = store_.lookup(handle);
     // Programming carefully. This will lead to ub if wrong typename T was 
passed in.
@@ -90,7 +90,7 @@ class ObjectStore {
     return casted;
   }
 
-  void release0(ResourceHandle handle);
+  void releaseInternal(ResourceHandle handle);
 
   ObjectStore(StoreHandle storeId) : storeId_(storeId){};
   StoreHandle storeId_;
diff --git a/cpp/velox/jni/JniFileSystem.cc b/cpp/velox/jni/JniFileSystem.cc
index fa849664e3..7c2b198bbc 100644
--- a/cpp/velox/jni/JniFileSystem.cc
+++ b/cpp/velox/jni/JniFileSystem.cc
@@ -74,7 +74,7 @@ class JniReadFile : public facebook::velox::ReadFile {
 
   ~JniReadFile() override {
     try {
-      close0();
+      closeInternal();
       JNIEnv* env = nullptr;
       attachCurrentThreadAsDaemonOrThrow(vm, &env);
       env->DeleteGlobalRef(obj_);
@@ -130,7 +130,7 @@ class JniReadFile : public facebook::velox::ReadFile {
   }
 
  private:
-  void close0() {
+  void closeInternal() {
     JNIEnv* env = nullptr;
     attachCurrentThreadAsDaemonOrThrow(vm, &env);
     env->CallVoidMethod(obj_, jniReadFileClose);
@@ -151,7 +151,7 @@ class JniWriteFile : public facebook::velox::WriteFile {
 
   ~JniWriteFile() override {
     try {
-      close0();
+      closeInternal();
       JNIEnv* env = nullptr;
       attachCurrentThreadAsDaemonOrThrow(vm, &env);
       env->DeleteGlobalRef(obj_);
@@ -178,7 +178,7 @@ class JniWriteFile : public facebook::velox::WriteFile {
   }
 
   void close() override {
-    close0();
+    closeInternal();
   }
 
   uint64_t size() const override {
@@ -190,7 +190,7 @@ class JniWriteFile : public facebook::velox::WriteFile {
   }
 
  private:
-  void close0() {
+  void closeInternal() {
     JNIEnv* env = nullptr;
     attachCurrentThreadAsDaemonOrThrow(vm, &env);
     env->CallVoidMethod(obj_, jniWriteFileClose);
diff --git a/cpp/velox/memory/VeloxMemoryManager.cc 
b/cpp/velox/memory/VeloxMemoryManager.cc
index 5e6fdd08a2..4c8a666936 100644
--- a/cpp/velox/memory/VeloxMemoryManager.cc
+++ b/cpp/velox/memory/VeloxMemoryManager.cc
@@ -119,7 +119,7 @@ class ListenableArbitrator : public 
velox::memory::MemoryArbitrator {
     }
     VELOX_CHECK(pool->root() == candidate, "Illegal state in 
ListenableArbitrator");
 
-    growCapacity0(pool->root(), targetBytes);
+    growCapacityInternal(pool->root(), targetBytes);
     return true;
   }
 
@@ -133,11 +133,11 @@ class ListenableArbitrator : public 
velox::memory::MemoryArbitrator {
       pool = candidates_.begin()->first;
     }
     pool->reclaim(targetBytes, memoryReclaimMaxWaitMs_, status); // ignore the 
output
-    return shrinkCapacity0(pool, 0);
+    return shrinkCapacityInternal(pool, 0);
   }
 
   uint64_t shrinkCapacity(velox::memory::MemoryPool* pool, uint64_t 
targetBytes) override {
-    return shrinkCapacity0(pool, targetBytes);
+    return shrinkCapacityInternal(pool, targetBytes);
   }
 
   Stats stats() const override {
@@ -150,7 +150,7 @@ class ListenableArbitrator : public 
velox::memory::MemoryArbitrator {
   }
 
  private:
-  void growCapacity0(velox::memory::MemoryPool* pool, uint64_t bytes) {
+  void growCapacityInternal(velox::memory::MemoryPool* pool, uint64_t bytes) {
     // Since
     // 
https://github.com/facebookincubator/velox/pull/9557/files#diff-436e44b7374032f8f5d7eb45869602add6f955162daa2798d01cc82f8725724dL812-L820,
     // We should pass bytes as parameter "reservationBytes" when calling 
::grow.
@@ -172,7 +172,7 @@ class ListenableArbitrator : public 
velox::memory::MemoryArbitrator {
         pool->toString());
   }
 
-  uint64_t shrinkCapacity0(velox::memory::MemoryPool* pool, uint64_t bytes) {
+  uint64_t shrinkCapacityInternal(velox::memory::MemoryPool* pool, uint64_t 
bytes) {
     uint64_t freeBytes = shrinkPool(pool, bytes);
     listener_->allocationChanged(-freeBytes);
     return freeBytes;
diff --git a/cpp/velox/shuffle/VeloxSortShuffleWriter.cc 
b/cpp/velox/shuffle/VeloxSortShuffleWriter.cc
index 7959adc43a..80d0349bc9 100644
--- a/cpp/velox/shuffle/VeloxSortShuffleWriter.cc
+++ b/cpp/velox/shuffle/VeloxSortShuffleWriter.cc
@@ -297,7 +297,7 @@ arrow::Status 
VeloxSortShuffleWriter::evictPartition(uint32_t partitionId, size_
     size = *(RowSizeType*)addr;
     if (offset + size > options_.sortEvictBufferSize && offset > 0) {
       sortTime.stop();
-      RETURN_NOT_OK(evictPartition0(partitionId, index - begin, rawBuffer_, 
offset));
+      RETURN_NOT_OK(evictPartitionInternal(partitionId, index - begin, 
rawBuffer_, offset));
       sortTime.start();
       begin = index;
       offset = 0;
@@ -310,7 +310,7 @@ arrow::Status 
VeloxSortShuffleWriter::evictPartition(uint32_t partitionId, size_
       while (bytes < size) {
         auto rawLength = 
std::min<RowSizeType>((uint32_t)options_.sortEvictBufferSize, size - bytes);
         // Use numRows = 0 to represent a part of row.
-        RETURN_NOT_OK(evictPartition0(partitionId, 0, buffer + bytes, 
rawLength));
+        RETURN_NOT_OK(evictPartitionInternal(partitionId, 0, buffer + bytes, 
rawLength));
         bytes += rawLength;
       }
       begin++;
@@ -325,14 +325,17 @@ arrow::Status 
VeloxSortShuffleWriter::evictPartition(uint32_t partitionId, size_
   sortTime.stop();
   if (offset > 0) {
     VELOX_CHECK(index > begin);
-    RETURN_NOT_OK(evictPartition0(partitionId, index - begin, rawBuffer_, 
offset));
+    RETURN_NOT_OK(evictPartitionInternal(partitionId, index - begin, 
rawBuffer_, offset));
   }
   sortTime_ += sortTime.realTimeUsed();
   return arrow::Status::OK();
 }
 
-arrow::Status
-VeloxSortShuffleWriter::evictPartition0(uint32_t partitionId, int32_t numRows, 
uint8_t* buffer, int64_t rawLength) {
+arrow::Status VeloxSortShuffleWriter::evictPartitionInternal(
+    uint32_t partitionId,
+    int32_t numRows,
+    uint8_t* buffer,
+    int64_t rawLength) {
   VELOX_CHECK(rawLength > 0);
   auto payload = std::make_unique<InMemoryPayload>(
       numRows,
diff --git a/cpp/velox/shuffle/VeloxSortShuffleWriter.h 
b/cpp/velox/shuffle/VeloxSortShuffleWriter.h
index 97c040ba59..42726a663b 100644
--- a/cpp/velox/shuffle/VeloxSortShuffleWriter.h
+++ b/cpp/velox/shuffle/VeloxSortShuffleWriter.h
@@ -80,7 +80,7 @@ class VeloxSortShuffleWriter final : public 
VeloxShuffleWriter {
 
   arrow::Status evictPartition(uint32_t partitionId, size_t begin, size_t end);
 
-  arrow::Status evictPartition0(uint32_t partitionId, int32_t numRows, 
uint8_t* buffer, int64_t rawLength);
+  arrow::Status evictPartitionInternal(uint32_t partitionId, int32_t numRows, 
uint8_t* buffer, int64_t rawLength);
 
   facebook::velox::vector_size_t maxRowsToInsert(
       facebook::velox::vector_size_t offset,
diff --git a/cpp/velox/substrait/SubstraitToVeloxPlan.cc 
b/cpp/velox/substrait/SubstraitToVeloxPlan.cc
index 5870c4ef9f..e95b4b74af 100644
--- a/cpp/velox/substrait/SubstraitToVeloxPlan.cc
+++ b/cpp/velox/substrait/SubstraitToVeloxPlan.cc
@@ -56,7 +56,7 @@ struct EmitInfo {
 };
 
 /// Helper function to extract the attributes required to create a ProjectNode
-/// used for interpretting Substrait Emit.
+/// used for interpreting Substrait Emit.
 EmitInfo getEmitInfo(const ::substrait::RelCommon& relCommon, const 
core::PlanNodePtr& node) {
   const auto& emit = relCommon.emit();
   int emitSize = emit.output_mapping_size();
diff --git a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc 
b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
index 153db70970..163d65221d 100644
--- a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
+++ b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
@@ -90,7 +90,7 @@ bool SubstraitToVeloxPlanValidator::parseVeloxType(
   return true;
 }
 
-bool SubstraitToVeloxPlanValidator::flattenVeloxType1(const TypePtr& type, 
std::vector<TypePtr>& out) {
+bool SubstraitToVeloxPlanValidator::flattenSingleLevel(const TypePtr& type, 
std::vector<TypePtr>& out) {
   if (type->kind() != TypeKind::ROW) {
     LOG_VALIDATION_MSG("Type is not a RowType.");
     return false;
@@ -106,7 +106,7 @@ bool SubstraitToVeloxPlanValidator::flattenVeloxType1(const 
TypePtr& type, std::
   return true;
 }
 
-bool SubstraitToVeloxPlanValidator::flattenVeloxType2(const TypePtr& type, 
std::vector<std::vector<TypePtr>>& out) {
+bool SubstraitToVeloxPlanValidator::flattenDualLevel(const TypePtr& type, 
std::vector<std::vector<TypePtr>>& out) {
   if (type->kind() != TypeKind::ROW) {
     LOG_VALIDATION_MSG("Type is not a RowType.");
     return false;
@@ -118,7 +118,7 @@ bool SubstraitToVeloxPlanValidator::flattenVeloxType2(const 
TypePtr& type, std::
   }
   for (const auto& field : rowType->children()) {
     std::vector<TypePtr> inner;
-    if (!flattenVeloxType1(field, inner)) {
+    if (!flattenSingleLevel(field, inner)) {
       return false;
     }
     out.emplace_back(inner);
@@ -371,7 +371,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::WriteRel& writeR
   std::vector<TypePtr> types;
   if (writeRel.has_named_table()) {
     const auto& extension = writeRel.named_table().advanced_extension();
-    if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+    if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
       LOG_VALIDATION_MSG("Validation failed for input type validation in 
WriteRel.");
       return false;
     }
@@ -412,7 +412,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::FetchRel& fetchR
     const auto& extension = fetchRel.advanced_extension();
     TypePtr inputRowType;
     std::vector<TypePtr> types;
-    if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+    if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
       LOG_VALIDATION_MSG("Unsupported input types in FetchRel.");
       return false;
     }
@@ -440,7 +440,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::TopNRel& topNRel
     const auto& extension = topNRel.advanced_extension();
     TypePtr inputRowType;
     std::vector<TypePtr> types;
-    if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+    if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
       LOG_VALIDATION_MSG("Unsupported input types in TopNRel.");
       return false;
     }
@@ -486,7 +486,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::GenerateRel& gen
   const auto& extension = generateRel.advanced_extension();
   TypePtr inputRowType;
   std::vector<TypePtr> types;
-  if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+  if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
     LOG_VALIDATION_MSG("Validation failed for input types in GenerateRel.");
     return false;
   }
@@ -517,7 +517,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::ExpandRel& expan
     const auto& extension = expandRel.advanced_extension();
     TypePtr inputRowType;
     std::vector<TypePtr> types;
-    if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+    if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
       LOG_VALIDATION_MSG("Unsupported input types in ExpandRel.");
       return false;
     }
@@ -602,7 +602,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::WindowRel& windo
   const auto& extension = windowRel.advanced_extension();
   TypePtr inputRowType;
   std::vector<TypePtr> types;
-  if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+  if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
     LOG_VALIDATION_MSG("Validation failed for input types in WindowRel.");
     return false;
   }
@@ -731,7 +731,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::WindowGroupLimit
   const auto& extension = windowGroupLimitRel.advanced_extension();
   TypePtr inputRowType;
   std::vector<TypePtr> types;
-  if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+  if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
     LOG_VALIDATION_MSG("Validation failed for input types in 
WindowGroupLimitRel.");
     return false;
   }
@@ -805,7 +805,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::SetRel& setRel)
       const auto& extension = setRel.advanced_extension();
       TypePtr inputRowType;
       std::vector<std::vector<TypePtr>> childrenTypes;
-      if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType2(inputRowType, childrenTypes)) {
+      if (!parseVeloxType(extension, inputRowType) || 
!flattenDualLevel(inputRowType, childrenTypes)) {
         LOG_VALIDATION_MSG("Validation failed for input types in SetRel.");
         return false;
       }
@@ -850,7 +850,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::SortRel& sortRel
   const auto& extension = sortRel.advanced_extension();
   TypePtr inputRowType;
   std::vector<TypePtr> types;
-  if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+  if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
     LOG_VALIDATION_MSG("Validation failed for input types in SortRel.");
     return false;
   }
@@ -904,7 +904,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::ProjectRel& proj
   const auto& extension = projectRel.advanced_extension();
   TypePtr inputRowType;
   std::vector<TypePtr> types;
-  if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+  if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
     LOG_VALIDATION_MSG("Validation failed for input types in ProjectRel.");
     return false;
   }
@@ -948,7 +948,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::FilterRel& filte
   const auto& extension = filterRel.advanced_extension();
   TypePtr inputRowType;
   std::vector<TypePtr> types;
-  if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+  if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
     LOG_VALIDATION_MSG("Validation failed for input types in FilterRel.");
     return false;
   }
@@ -1022,7 +1022,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::JoinRel& joinRel
   const auto& extension = joinRel.advanced_extension();
   TypePtr inputRowType;
   std::vector<TypePtr> types;
-  if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+  if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
     LOG_VALIDATION_MSG("Validation failed for input types in JoinRel.");
     return false;
   }
@@ -1076,7 +1076,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::CrossRel& crossR
   const auto& extension = crossRel.advanced_extension();
   TypePtr inputRowType;
   std::vector<TypePtr> types;
-  if (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types)) {
+  if (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types)) {
     logValidateMsg("Native validation failed due to: Validation failed for 
input types in CrossRel");
     return false;
   }
@@ -1160,7 +1160,7 @@ bool SubstraitToVeloxPlanValidator::validate(const 
::substrait::AggregateRel& ag
     // Aggregate always has advanced extension for streaming aggregate 
optimization,
     // but only some of them have enhancement for validation.
     if (extension.has_enhancement() &&
-        (!parseVeloxType(extension, inputRowType) || 
!flattenVeloxType1(inputRowType, types))) {
+        (!parseVeloxType(extension, inputRowType) || 
!flattenSingleLevel(inputRowType, types))) {
       LOG_VALIDATION_MSG("Validation failed for input types in AggregateRel.");
       return false;
     }
diff --git a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.h 
b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.h
index 0c8d882ca0..befc884a42 100644
--- a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.h
+++ b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.h
@@ -111,10 +111,10 @@ class SubstraitToVeloxPlanValidator {
   bool parseVeloxType(const ::substrait::extensions::AdvancedExtension& 
extension, TypePtr& out);
 
   /// Flattens a Velox type with single level of nesting into a std::vector of 
child types.
-  bool flattenVeloxType1(const TypePtr& type, std::vector<TypePtr>& out);
+  bool flattenSingleLevel(const TypePtr& type, std::vector<TypePtr>& out);
 
   /// Flattens a Velox type with two level of nesting into a dual-nested 
std::vector of child types.
-  bool flattenVeloxType2(const TypePtr& type, 
std::vector<std::vector<TypePtr>>& out);
+  bool flattenDualLevel(const TypePtr& type, 
std::vector<std::vector<TypePtr>>& out);
 
   /// Validate aggregate rel.
   bool validateAggRelFunctionType(const ::substrait::AggregateRel& 
substraitAgg);
diff --git a/cpp/velox/udf/UdfLoader.cc b/cpp/velox/udf/UdfLoader.cc
index 4509467262..857fae0c3f 100644
--- a/cpp/velox/udf/UdfLoader.cc
+++ b/cpp/velox/udf/UdfLoader.cc
@@ -49,10 +49,10 @@ namespace gluten {
 
 void UdfLoader::loadUdfLibraries(const std::string& libPaths) {
   const auto& paths = splitPaths(libPaths, /*checkExists=*/true);
-  loadUdfLibraries0(paths);
+  loadUdfLibrariesInternal(paths);
 }
 
-void UdfLoader::loadUdfLibraries0(const std::vector<std::string>& libPaths) {
+void UdfLoader::loadUdfLibrariesInternal(const std::vector<std::string>& 
libPaths) {
   for (const auto& libPath : libPaths) {
     if (handles_.find(libPath) == handles_.end()) {
       void* handle = dlopen(libPath.c_str(), RTLD_LAZY);
diff --git a/cpp/velox/udf/UdfLoader.h b/cpp/velox/udf/UdfLoader.h
index 8a28c2a351..31436054b6 100644
--- a/cpp/velox/udf/UdfLoader.h
+++ b/cpp/velox/udf/UdfLoader.h
@@ -79,7 +79,7 @@ class UdfLoader {
   void registerUdf();
 
  private:
-  void loadUdfLibraries0(const std::vector<std::string>& libPaths);
+  void loadUdfLibrariesInternal(const std::vector<std::string>& libPaths);
 
   std::string toSubstraitTypeStr(const std::string& type);
 


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

Reply via email to