You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by ta...@apache.org on 2026/07/01 11:30:38 UTC
(gluten) 07/38: [GLUTEN][CORE] Support HiveGenericUDTF in HiveUDFTransformer
This is an automated email from the ASF dual-hosted git repository.
taiyang-li pushed a commit to branch fake_add_bolt_backend
in repository https://gitbox.apache.org/repos/asf/gluten.git
commit 7bbd377877a2fb94f771d7e4be56e3e760c7d206
Author: liyang.127 <li...@bytedance.com>
AuthorDate: Sat Jun 27 11:52:50 2026 +0800
[GLUTEN][CORE] Support HiveGenericUDTF in HiveUDFTransformer
Recognize HiveGenericUDTF in HiveUDFTransformer.isHiveUDF and extract
its name/class in getHiveUDFNameAndClassName, so a Hive generic UDTF
can be mapped and offloaded to a native function (via UDFMappings)
like HiveSimpleUDF/HiveGenericUDF. No behavior change for backends
that do not register a UDTF mapping: unmapped UDTFs still throw
GlutenNotSupportException and fall back.
Generated-by: TraeCli openrouter-3o
---
.../src/main/scala/org/apache/spark/sql/hive/HiveUDFTransformer.scala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gluten-substrait/src/main/scala/org/apache/spark/sql/hive/HiveUDFTransformer.scala b/gluten-substrait/src/main/scala/org/apache/spark/sql/hive/HiveUDFTransformer.scala
index 4caf4fb43e..d30579fe2d 100644
--- a/gluten-substrait/src/main/scala/org/apache/spark/sql/hive/HiveUDFTransformer.scala
+++ b/gluten-substrait/src/main/scala/org/apache/spark/sql/hive/HiveUDFTransformer.scala
@@ -26,7 +26,7 @@ import java.util.Locale
object HiveUDFTransformer {
def isHiveUDF(expr: Expression): Boolean = {
expr match {
- case _: HiveSimpleUDF | _: HiveGenericUDF => true
+ case _: HiveSimpleUDF | _: HiveGenericUDF | _: HiveGenericUDTF => true
case _ => false
}
}
@@ -36,6 +36,8 @@ object HiveUDFTransformer {
(s.name.stripPrefix("default."), s.funcWrapper.functionClassName)
case g: HiveGenericUDF =>
(g.name.stripPrefix("default."), g.funcWrapper.functionClassName)
+ case t: HiveGenericUDTF =>
+ (t.name.stripPrefix("default."), t.funcWrapper.functionClassName)
case _ =>
throw new GlutenNotSupportException(
s"Expression $expr is not a HiveSimpleUDF or HiveGenericUDF")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org