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 <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
