aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoingDone9 <799203320@qq.com>2015-04-02 17:23:51 -0700
committerMichael Armbrust <michael@databricks.com>2015-04-02 17:23:51 -0700
commit947802cb0de581e51f8141f6663e896de3d753ce (patch)
tree8a1c18ba1d87303220c172fc4f1af2c28c0cf526
parentdfd2982bc7047732197f1d9ad77221e9c6076fc2 (diff)
downloadspark-947802cb0de581e51f8141f6663e896de3d753ce.tar.gz
spark-947802cb0de581e51f8141f6663e896de3d753ce.tar.bz2
spark-947802cb0de581e51f8141f6663e896de3d753ce.zip
[SPARK-6243][SQL] The Operation of match did not conside the scenarios that order.dataType does not match NativeType
It did not conside that order.dataType does not match NativeType. So i add "case other => ..." for other cenarios. Author: DoingDone9 <799203320@qq.com> Closes #4959 from DoingDone9/case_ and squashes the following commits: 6278846 [DoingDone9] Update rows.scala cb1852d [DoingDone9] Merge pull request #2 from apache/master c3f046f [DoingDone9] Merge pull request #1 from apache/master
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/rows.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/rows.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/rows.scala
index a8983df208..0a275b8408 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/rows.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/rows.scala
@@ -224,6 +224,7 @@ class RowOrdering(ordering: Seq[SortOrder]) extends Ordering[Row] {
n.ordering.asInstanceOf[Ordering[Any]].compare(left, right)
case n: NativeType if order.direction == Descending =>
n.ordering.asInstanceOf[Ordering[Any]].reverse.compare(left, right)
+ case other => sys.error(s"Type $other does not support ordered operations")
}
if (comparison != 0) return comparison
}