spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-17989) Check ascendingOrder type in sort_array function ahead
Date Tue, 18 Oct 2016 15:33:58 GMT
Hyukjin Kwon created SPARK-17989:
------------------------------------

             Summary: 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


Mime
View raw message