Skip to content

Commit eee74e7

Browse files
author
wangzhenhua
committed
fix comments about naming
1 parent a61e865 commit eee74e7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,10 @@ object QueryPlan extends PredicateHelper {
444444
}
445445

446446
/** Normalize and reorder the expressions in the given sequence. */
447-
def canonicalizeExprSeq(exprSeq: Seq[Expression], output: AttributeSeq): Seq[Expression] = {
448-
if (exprSeq.nonEmpty) {
449-
val normalizedExprs = QueryPlan.normalizeExprId(exprSeq.reduce(And), output)
450-
splitConjunctivePredicates(normalizedExprs)
447+
def normalizePredicates(predicates: Seq[Expression], output: AttributeSeq): Seq[Expression] = {
448+
if (predicates.nonEmpty) {
449+
val normalized = normalizeExprId(predicates.reduce(And), output)
450+
splitConjunctivePredicates(normalized)
451451
} else {
452452
Nil
453453
}

sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,8 @@ case class FileSourceScanExec(
519519
relation,
520520
output.map(QueryPlan.normalizeExprId(_, output)),
521521
requiredSchema,
522-
QueryPlan.canonicalizeExprSeq(partitionFilters, output),
523-
QueryPlan.canonicalizeExprSeq(dataFilters, output),
522+
QueryPlan.normalizePredicates(partitionFilters, output),
523+
QueryPlan.normalizePredicates(dataFilters, output),
524524
None)
525525
}
526526
}

sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveTableScanExec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ case class HiveTableScanExec(
206206
HiveTableScanExec(
207207
requestedAttributes.map(QueryPlan.normalizeExprId(_, input)),
208208
relation.canonicalized.asInstanceOf[CatalogRelation],
209-
QueryPlan.canonicalizeExprSeq(partitionPruningPred, input))(sparkSession)
209+
QueryPlan.normalizePredicates(partitionPruningPred, input))(sparkSession)
210210
}
211211

212212
override def otherCopyArgs: Seq[AnyRef] = Seq(sparkSession)

0 commit comments

Comments
 (0)