You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Armbrust (JIRA)" <ji...@apache.org> on 2014/11/21 01:52:33 UTC

[jira] [Resolved] (SPARK-4244) ConstantFolding has to be done before initialize the Generic UDF

     [ https://issues.apache.org/jira/browse/SPARK-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Armbrust resolved SPARK-4244.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.2.0

Issue resolved by pull request 3109
[https://github.com/apache/spark/pull/3109]

> ConstantFolding has to be done before initialize the Generic UDF
> ----------------------------------------------------------------
>
>                 Key: SPARK-4244
>                 URL: https://issues.apache.org/jira/browse/SPARK-4244
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Cheng Hao
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> The query is 
> "SELECT named_struct(lower("AA"), "12", lower("Bb"), "13") FROM src LIMIT 1:
> It throws exception
> {panel}
> Even arguments to NAMED_STRUCT must be a constant STRING.org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaStringObjectInspector@798a6e99
> org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException: Even arguments to NAMED_STRUCT must be a constant STRING.org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaStringObjectInspector@798a6e99
> 	at org.apache.hadoop.hive.ql.udf.generic.GenericUDFNamedStruct.initialize(GenericUDFNamedStruct.java:55)
> 	at org.apache.spark.sql.hive.HiveGenericUdf.returnInspector$lzycompute(hiveUdfs.scala:157)
> 	at org.apache.spark.sql.hive.HiveGenericUdf.returnInspector(hiveUdfs.scala:157)
> 	at org.apache.spark.sql.hive.HiveGenericUdf.dataType$lzycompute(hiveUdfs.scala:173)
> 	at org.apache.spark.sql.hive.HiveGenericUdf.dataType(hiveUdfs.scala:173)
> 	at org.apache.spark.sql.catalyst.expressions.Alias.toAttribute(namedExpressions.scala:104)
> 	at org.apache.spark.sql.catalyst.plans.logical.Project$$anonfun$output$1.apply(basicOperators.scala:25)
> 	at org.apache.spark.sql.catalyst.plans.logical.Project$$anonfun$output$1.apply(basicOperators.scala:25)
> {panel}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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