Skip to content

Commit

Permalink
Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
liancheng committed Dec 22, 2017
1 parent c2ac222 commit 07e46b9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/scala/org/apache/spark/sql/TiStrategy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import com.pingcap.tispark.TiUtils._
import com.pingcap.tispark.{BasicExpression, TiConfigConst, TiDBRelation, TiUtils}
import org.apache.spark.internal.Logging
import org.apache.spark.sql.catalyst.expressions.aggregate.{AggregateExpression, _}
import org.apache.spark.sql.catalyst.expressions.{Alias, Attribute, AttributeReference, AttributeSet, Cast, Divide, ExprId, Expression, IntegerLiteral, NamedExpression, SortOrder}
import org.apache.spark.sql.catalyst.expressions.{Alias, Attribute, AttributeSet, Cast, Divide, Expression, IntegerLiteral, NamedExpression, SortOrder}
import org.apache.spark.sql.catalyst.expressions.NamedExpression.newExprId
import org.apache.spark.sql.catalyst.planning.{PhysicalAggregation, PhysicalOperation}
import org.apache.spark.sql.catalyst.plans.logical
Expand All @@ -35,8 +35,6 @@ import org.apache.spark.sql.execution.datasources.LogicalRelation
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.types._

import scala.collection.mutable

// TODO: Too many hacks here since we hijack the planning
// but we don't have full control over planning stage
// We cannot pass context around during planning so
Expand Down Expand Up @@ -203,8 +201,7 @@ class TiStrategy(context: SQLContext) extends Strategy with Logging {
child: LogicalPlan,
project: Seq[NamedExpression]
): SparkPlan = {
// If sortOrder is not null, limit must be greater than 0
if (limit < 0 || (sortOrder == null && limit == 0)) {
if (limit < 0 || (sortOrder.isEmpty && limit == 0)) {
return execution.TakeOrderedAndProjectExec(limit, sortOrder, project, planLater(child))
}

Expand Down

0 comments on commit 07e46b9

Please sign in to comment.