spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <>
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
             Project: Spark
          Issue Type: Bug
          Components: SQL
            Reporter: Hyukjin Kwon
            Priority: Trivial

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(
	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)

I guess we should also check this in `checkInputDataTypes`.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message