Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use forall instead of exists for readability.
  • Loading branch information
viirya committed Jul 24, 2015
commit a2407074dc34672f71c33d671d285809969bfc78
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
private[this] def isValidSort(
leftKeys: Seq[Expression],
rightKeys: Seq[Expression]): Boolean = {
!leftKeys.zip(rightKeys).exists { keys =>
leftKeys.zip(rightKeys).forall { keys =>
(keys._1.dataType, keys._2.dataType) match {
case (l: AtomicType, r: AtomicType) => false
case (NullType, NullType) => false
case _ => true
case (l: AtomicType, r: AtomicType) => true
case (NullType, NullType) => true
case _ => false
}
}
}
Expand Down