Skip to content

Commit eea0dfe

Browse files
committed
Move the testcase into FilterPushdownSuite.
1 parent 775f59e commit eea0dfe

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@ class FilterPushdownSuite extends PlanTest {
150150
comparePlans(optimized, originalQuery)
151151
}
152152

153+
test("SPARK-16994: filter should not be pushed down into local limit") {
154+
val originalQuery = testRelation
155+
.limit(1)
156+
.where('a % 2 == 0)
157+
.analyze
158+
159+
val optimized = Optimize.execute(originalQuery)
160+
161+
comparePlans(optimized, originalQuery)
162+
}
163+
153164
test("filters: combines filters") {
154165
val originalQuery = testRelation
155166
.select('a)

sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,11 +1730,6 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
17301730
}
17311731
}
17321732

1733-
test("SPARK-16994: filter should not be pushed down into local limit") {
1734-
checkAnswer(spark.createDataset(1 to 100).limit(10).filter($"value" % 10 === 0).toDF(),
1735-
Row(10) :: Nil)
1736-
}
1737-
17381733
test("Struct Star Expansion") {
17391734
val structDf = testData2.select("a", "b").as("record")
17401735

0 commit comments

Comments
 (0)