marin-ma commented on code in PR #5130:
URL: https://github.com/apache/incubator-gluten/pull/5130#discussion_r1542268155


##########
cpp/velox/udf/UdfLoader.cc:
##########
@@ -77,11 +78,34 @@ 
std::unordered_set<std::shared_ptr<UdfLoader::UdfSignature>> UdfLoader::getRegis
       const auto& entry = udfEntry[i];
       auto dataType = toSubstraitTypeStr(entry.dataType);
       auto argTypes = toSubstraitTypeStr(entry.numArgs, entry.argTypes);
-      signatures.insert(std::make_shared<UdfSignature>(entry.name, dataType, 
argTypes));
+      if (entry.intermediateType) {
+        auto intermediateType = toSubstraitTypeStr(entry.intermediateType);
+        signatures_.insert(std::make_shared<UdfSignature>(entry.name, 
dataType, argTypes, intermediateType));
+      } else {
+        signatures_.insert(std::make_shared<UdfSignature>(entry.name, 
dataType, argTypes));
+      }
     }
     free(udfEntry);
   }
-  return signatures;
+  return signatures_;
+}
+
+std::unordered_set<std::string> UdfLoader::getRegisteredUdafNames() {
+  if (handles_.empty()) {
+    return {};
+  }
+  if (!names_.empty()) {
+    return names_;
+  }
+  if (signatures_.empty()) {
+    getRegisteredUdfSignatures();
+  }
+  for (const auto& sig : signatures_) {
+    if (!sig->intermediateType.empty()) {

Review Comment:
   Thanks. I've also considered this design. Will address that.



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