You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/10/18 16:10:58 UTC
[jira] [Commented] (SPARK-17989) Check ascendingOrder type in
sort_array function ahead
[ https://issues.apache.org/jira/browse/SPARK-17989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15585855#comment-15585855 ]
Apache Spark commented on SPARK-17989:
--------------------------------------
User 'HyukjinKwon' has created a pull request for this issue:
https://github.com/apache/spark/pull/15532
> Check ascendingOrder type in sort_array function ahead
> ------------------------------------------------------
>
> Key: SPARK-17989
> URL: https://issues.apache.org/jira/browse/SPARK-17989
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Reporter: Hyukjin Kwon
> Priority: Trivial
>
> {code}
> spark-sql> SELECT sort_array(array('b', 'd', 'c', 'a'), '1');
> 16/10/19 00:28:54 ERROR SparkSQLDriver: Failed in [SELECT sort_array(array('b', 'd', 'c', 'a'), '1')]
> java.lang.ClassCastException: org.apache.spark.unsafe.types.UTF8String cannot be cast to java.lang.Boolean
> at scala.runtime.BoxesRunTime.unboxToBoolean(BoxesRunTime.java:85)
> at org.apache.spark.sql.catalyst.expressions.SortArray.nullSafeEval(collectionOperations.scala:185)
> at org.apache.spark.sql.catalyst.expressions.BinaryExpression.eval(Expression.scala:416)
> at org.apache.spark.sql.catalyst.optimizer.ConstantFolding$$anonfun$apply$1$$anonfun$applyOrElse$1.applyOrElse(expressions.scala:50)
> at org.apache.spark.sql.catalyst.optimizer.ConstantFolding$$anonfun$apply$1$$anonfun$applyOrElse$1.applyOrElse(expressions.scala:43)
> {code}
> I guess we should also check this in `checkInputDataTypes`.
--
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