Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.0.0
-
None
-
None
Description
spark.udf.register("udf", (input: Double) => input) sql("SELECT * FROM (VALUES (CAST(udf('1') AS DOUBLE)), (CAST(udf('Infinity') AS DOUBLE))) v(x)")
org.apache.spark.sql.AnalysisException: cannot evaluate expression CAST(UDF:udf(1) AS DOUBLE) in inline table definition; line 1 pos 23 at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42) at org.apache.spark.sql.catalyst.analysis.ResolveInlineTables.$anonfun$validateInputEvaluable$2(ResolveInlineTables.scala:68) at org.apache.spark.sql.catalyst.analysis.ResolveInlineTables.$anonfun$validateInputEvaluable$2$adapted(ResolveInlineTables.scala:65) at scala.collection.immutable.List.foreach(List.scala:392) at org.apache.spark.sql.catalyst.analysis.ResolveInlineTables.$anonfun$validateInputEvaluable$1(ResolveInlineTables.scala:65) at org.apache.spark.sql.catalyst.analysis.ResolveInlineTables.$anonfun$validateInputEvaluable$1$adapted(ResolveInlineTables.scala:64) at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
Attachments
Issue Links
- is related to
-
SPARK-28270 Convert and port 'pgSQL/aggregates_part1.sql' into UDF test base
- Resolved