Skip to content

Commit 2f576fa

Browse files
committed
fix return bug
1 parent 69f1763 commit 2f576fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ object PushCNFPredicateThroughFileScan extends Rule[LogicalPlan] with PredicateH
3535
def apply(plan: LogicalPlan): LogicalPlan = {
3636
var resolved = false
3737
plan resolveOperatorsDown {
38-
case ScanOperation(projectList, conditions, relation: LogicalRelation)
38+
case op @ ScanOperation(projectList, conditions, relation: LogicalRelation)
3939
if conditions.nonEmpty && !resolved =>
4040
resolved = true
4141
val predicates = conjunctiveNormalFormAndGroupExpsByReference(conditions.reduceLeft(And))
4242
if (predicates.isEmpty) {
43-
plan
43+
op
4444
} else {
4545
Project(projectList, Filter(predicates.reduceLeft(And), relation))
4646
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ object PushCNFPredicateThroughHiveTableScan extends Rule[LogicalPlan] with Predi
3434
def apply(plan: LogicalPlan): LogicalPlan = {
3535
var resolved = false
3636
plan resolveOperatorsDown {
37-
case ScanOperation(projectList, conditions, relation: HiveTableRelation)
37+
case op @ ScanOperation(projectList, conditions, relation: HiveTableRelation)
3838
if conditions.nonEmpty && !resolved =>
3939
resolved = true
4040
val predicates = conjunctiveNormalFormAndGroupExpsByReference(conditions.reduceLeft(And))
4141
if (predicates.isEmpty) {
42-
plan
42+
op
4343
} else {
4444
Project(projectList, Filter(predicates.reduceLeft(And), relation))
4545
}

0 commit comments

Comments
 (0)