PHILO-HE commented on code in PR #5036:
URL: https://github.com/apache/incubator-gluten/pull/5036#discussion_r1531531449
##########
gluten-core/src/main/scala/io/glutenproject/expression/ExpressionConverter.scala:
##########
@@ -83,6 +83,9 @@ object ExpressionConverter extends SQLConfHelper with Logging
{
udf: ScalaUDF,
attributeSeq: Seq[Attribute],
expressionsMap: Map[Class[_], String]): ExpressionTransformer = {
+ if (!udf.udfName.isDefined) {
+ throw new GlutenNotSupportException("UDF name is not found!")
Review Comment:
This is to fix NoSuchElementException that can be thrown in some Spark UTs,
where scala UDF is used with no name provided.
##########
gluten-core/src/main/scala/io/glutenproject/expression/ExpressionConverter.scala:
##########
@@ -83,6 +83,9 @@ object ExpressionConverter extends SQLConfHelper with Logging
{
udf: ScalaUDF,
attributeSeq: Seq[Attribute],
expressionsMap: Map[Class[_], String]): ExpressionTransformer = {
+ if (!udf.udfName.isDefined) {
+ throw new GlutenNotSupportException("UDF name is not found!")
Review Comment:
This is to fix `NoSuchElementException` that can be thrown in some Spark
UTs, where scala UDF is used with no name provided.
--
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]