From 7bf960cbe1697c8086a880661a361e8991a73107 Mon Sep 17 00:00:00 2001 From: Anton Gozhiy Date: Fri, 19 Apr 2019 02:41:32 +0300 Subject: [PATCH] DRILL-7038: Added tests to verify that scan is not happening when only partition is being selected (#580) --- .../dfs/parquet/data/DRILL_7038_dir0_distinct.e_tsv | 3 +++ .../dfs/parquet/data/DRILL_7038_dir0_distinct.sql | 1 + .../dfs/parquet/data/DRILL_7038_dir0_group_by.e_tsv | 3 +++ .../dfs/parquet/data/DRILL_7038_dir0_group_by.sql | 1 + .../dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.plan | 1 + .../parquet/plan/regex/DRILL_7038_dir0_distinct.sql.explain | 1 + .../dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.plan | 1 + .../parquet/plan/regex/DRILL_7038_dir0_group_by.sql.explain | 1 + 8 files changed, 12 insertions(+) create mode 100644 framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_distinct.e_tsv create mode 100644 framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_distinct.sql create mode 100644 framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_group_by.e_tsv create mode 100644 framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_group_by.sql create mode 100644 framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.plan create mode 100644 framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.sql.explain create mode 100644 framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.plan create mode 100644 framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.sql.explain diff --git a/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_distinct.e_tsv b/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_distinct.e_tsv new file mode 100644 index 000000000..376a87eb0 --- /dev/null +++ b/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_distinct.e_tsv @@ -0,0 +1,3 @@ +1993 +1994 +1995 \ No newline at end of file diff --git a/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_distinct.sql b/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_distinct.sql new file mode 100644 index 000000000..14f590c1e --- /dev/null +++ b/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_distinct.sql @@ -0,0 +1 @@ +select distinct dir0 from dfs.drillTestDir.`/partition_pruning/dfs/orders`; \ No newline at end of file diff --git a/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_group_by.e_tsv b/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_group_by.e_tsv new file mode 100644 index 000000000..376a87eb0 --- /dev/null +++ b/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_group_by.e_tsv @@ -0,0 +1,3 @@ +1993 +1994 +1995 \ No newline at end of file diff --git a/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_group_by.sql b/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_group_by.sql new file mode 100644 index 000000000..7363f0a57 --- /dev/null +++ b/framework/resources/Functional/partition_pruning/dfs/parquet/data/DRILL_7038_dir0_group_by.sql @@ -0,0 +1 @@ +select dir0 from dfs.drillTestDir.`/partition_pruning/dfs/orders` group by dir0; \ No newline at end of file diff --git a/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.plan b/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.plan new file mode 100644 index 000000000..cf6524177 --- /dev/null +++ b/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.plan @@ -0,0 +1 @@ +Values.*\[\{ '1994' \}, \{ '1993' \}, \{ '1995' \}\] \ No newline at end of file diff --git a/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.sql.explain b/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.sql.explain new file mode 100644 index 000000000..b27266454 --- /dev/null +++ b/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_distinct.sql.explain @@ -0,0 +1 @@ +explain plan for select distinct dir0 from dfs.drillTestDir.`/partition_pruning/dfs/orders`; \ No newline at end of file diff --git a/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.plan b/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.plan new file mode 100644 index 000000000..cf6524177 --- /dev/null +++ b/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.plan @@ -0,0 +1 @@ +Values.*\[\{ '1994' \}, \{ '1993' \}, \{ '1995' \}\] \ No newline at end of file diff --git a/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.sql.explain b/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.sql.explain new file mode 100644 index 000000000..86878bc3c --- /dev/null +++ b/framework/resources/Functional/partition_pruning/dfs/parquet/plan/regex/DRILL_7038_dir0_group_by.sql.explain @@ -0,0 +1 @@ +explain plan for select dir0 from dfs.drillTestDir.`/partition_pruning/dfs/orders` group by dir0; \ No newline at end of file