Wan Kun created SPARK-52014:
-------------------------------

             Summary: Support FoldableUnevaluable in HiveGenericUDFEvaluator
                 Key: SPARK-52014
                 URL: https://issues.apache.org/jira/browse/SPARK-52014
             Project: Spark
          Issue Type: Task
          Components: SQL
    Affects Versions: 4.0.0
            Reporter: Wan Kun


FoldableUnevaluable expression will throw exception in HiveGenericUDFEvaluator, 
we should skip eval() for them.

{code:java}
    // ideally, we don't test the foldable here(but in optimizer), however, 
some of the
    // Hive UDF / UDAF requires its argument to be constant objectinspector, we 
do it eagerly.
    case _ if expr.foldable => toInspector(Literal.create(expr.eval(), 
expr.dataType))
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to