aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/limit.sql.out
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2016-08-19 21:11:35 +0800
committerWenchen Fan <wenchen@databricks.com>2016-08-19 21:11:35 +0800
commit67e59d464f782ff5f509234212aa072a7653d7bf (patch)
tree7b7c935a0ead8d5043443a4712584f173ef83342 /sql/core/src/test/resources/sql-tests/results/limit.sql.out
parent072acf5e1460d66d4b60b536d5b2ccddeee80794 (diff)
downloadspark-67e59d464f782ff5f509234212aa072a7653d7bf.tar.gz
spark-67e59d464f782ff5f509234212aa072a7653d7bf.tar.bz2
spark-67e59d464f782ff5f509234212aa072a7653d7bf.zip
[SPARK-16994][SQL] Whitelist operators for predicate pushdown
## What changes were proposed in this pull request? This patch changes predicate pushdown optimization rule (PushDownPredicate) from using a blacklist to a whitelist. That is to say, operators must be explicitly allowed. This approach is more future-proof: previously it was possible for us to introduce a new operator and then render the optimization rule incorrect. This also fixes the bug that previously we allowed pushing filter beneath limit, which was incorrect. That is to say, before this patch, the optimizer would rewrite ``` select * from (select * from range(10) limit 5) where id > 3 to select * from range(10) where id > 3 limit 5 ``` ## How was this patch tested? - a unit test case in FilterPushdownSuite - an end-to-end test in limit.sql Author: Reynold Xin <rxin@databricks.com> Closes #14713 from rxin/SPARK-16994.
Diffstat (limited to 'sql/core/src/test/resources/sql-tests/results/limit.sql.out')
-rw-r--r--sql/core/src/test/resources/sql-tests/results/limit.sql.out10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/core/src/test/resources/sql-tests/results/limit.sql.out b/sql/core/src/test/resources/sql-tests/results/limit.sql.out
index b71b058869..cb4e4d0481 100644
--- a/sql/core/src/test/resources/sql-tests/results/limit.sql.out
+++ b/sql/core/src/test/resources/sql-tests/results/limit.sql.out
@@ -1,5 +1,5 @@
-- Automatically generated by SQLQueryTestSuite
--- Number of queries: 9
+-- Number of queries: 10
-- !query 0
@@ -81,3 +81,11 @@ struct<>
-- !query 8 output
org.apache.spark.sql.AnalysisException
The limit expression must be integer type, but got string;
+
+
+-- !query 9
+select * from (select * from range(10) limit 5) where id > 3
+-- !query 9 schema
+struct<id:bigint>
+-- !query 9 output
+4