DRILL-6834: Added tests to verify Drill option exec.return_result_set_for_ddl (#523)

diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_create_table_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_create_table_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_create_table_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_create_table_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_create_table_no_result_set.sql
new file mode 100644
index 0000000..bee903d
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_create_table_no_result_set.sql
@@ -0,0 +1,5 @@
+set `exec.return_result_set_for_ddl` = false;
+--@test
+create table `DRILL_6834_table_no_result_set` as select * from cp.`employee.json` limit 5;
+drop table `DRILL_6834_table_no_result_set`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_create_temporary_table_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_create_temporary_table_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_create_temporary_table_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_create_temporary_table_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_create_temporary_table_no_result_set.sql
new file mode 100644
index 0000000..c192001
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_create_temporary_table_no_result_set.sql
@@ -0,0 +1,5 @@
+set `exec.return_result_set_for_ddl` = false;
+--@test
+create temporary table dfs.tmp.`DRILL_6834_temp_table_no_result_set` as select * from cp.`employee.json` limit 5;
+drop table dfs.tmp.`DRILL_6834_temp_table_no_result_set`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_create_view_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_create_view_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_create_view_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_create_view_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_create_view_no_result_set.sql
new file mode 100644
index 0000000..3a8817d
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_create_view_no_result_set.sql
@@ -0,0 +1,5 @@
+set `exec.return_result_set_for_ddl` = false;
+--@test
+create view `DRILL_6834_view_no_result_set` as select * from cp.`employee.json` limit 5;
+drop view `DRILL_6834_view_no_result_set`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_drop_table_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_drop_table_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_drop_table_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_drop_table_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_drop_table_no_result_set.sql
new file mode 100644
index 0000000..e831d45
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_drop_table_no_result_set.sql
@@ -0,0 +1,5 @@
+set `exec.return_result_set_for_ddl` = false;
+create table `DRILL_6834_drop_table_no_result_set` as select * from cp.`employee.json` limit 5;
+--@test
+drop table `DRILL_6834_drop_table_no_result_set`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_drop_temporary_table_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_drop_temporary_table_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_drop_temporary_table_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_drop_temporary_table_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_drop_temporary_table_no_result_set.sql
new file mode 100644
index 0000000..3ffe32f
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_drop_temporary_table_no_result_set.sql
@@ -0,0 +1,5 @@
+set `exec.return_result_set_for_ddl` = false;
+create temporary table `DRILL_6834_drop_temporary_table_no_result_set` as select * from cp.`employee.json` limit 5;
+--@test
+drop table `DRILL_6834_drop_temporary_table_no_result_set`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_drop_view_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_drop_view_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_drop_view_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_drop_view_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_drop_view_no_result_set.sql
new file mode 100644
index 0000000..2837817
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_drop_view_no_result_set.sql
@@ -0,0 +1,5 @@
+set `exec.return_result_set_for_ddl` = false;
+create view `DRILL_6834_drop_view_no_result_set` as select * from cp.`employee.json` limit 5;
+--@test
+drop view `DRILL_6834_drop_view_no_result_set`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_refresh_table_metadata_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_refresh_table_metadata_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_refresh_table_metadata_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_refresh_table_metadata_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_refresh_table_metadata_no_result_set.sql
new file mode 100644
index 0000000..c5b7bdd
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_refresh_table_metadata_no_result_set.sql
@@ -0,0 +1,5 @@
+set `exec.return_result_set_for_ddl` = false;
+create table `DRILL_6834_refresh_metadata_table_no_result_set` as select * from cp.`employee.json` limit 5;
+refresh table metadata `DRILL_6834_refresh_metadata_table_no_result_set`;
+drop table `DRILL_6834_refresh_metadata_table_no_result_set`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_reset_option_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_reset_option_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_reset_option_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_reset_option_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_reset_option_no_result_set.sql
new file mode 100644
index 0000000..80275af
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_reset_option_no_result_set.sql
@@ -0,0 +1,3 @@
+set `exec.return_result_set_for_ddl` = false;
+reset `store.format`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_select_query.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_select_query.e_tsv
new file mode 100644
index 0000000..7c3f986
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_select_query.e_tsv
@@ -0,0 +1,5 @@
+Sheri	Nowmer
+Derrick	Whelply
+Michael	Spence
+Maya	Gutierrez
+Roberta	Damstra
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_select_query.sql b/framework/resources/Functional/no_result_set/DRILL_6834_select_query.sql
new file mode 100644
index 0000000..82518a2
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_select_query.sql
@@ -0,0 +1,3 @@
+set `exec.return_result_set_for_ddl` = false;
+select first_name, last_name from cp.`employee.json` order by employee_id limit 5;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_set_option_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_set_option_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_set_option_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_set_option_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_set_option_no_result_set.sql
new file mode 100644
index 0000000..dfccd15
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_set_option_no_result_set.sql
@@ -0,0 +1,5 @@
+set `exec.return_result_set_for_ddl` = false;
+--@test
+set `store.format` = 'json';
+reset `store.format`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_use_no_result_set.e_tsv b/framework/resources/Functional/no_result_set/DRILL_6834_use_no_result_set.e_tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_use_no_result_set.e_tsv
diff --git a/framework/resources/Functional/no_result_set/DRILL_6834_use_no_result_set.sql b/framework/resources/Functional/no_result_set/DRILL_6834_use_no_result_set.sql
new file mode 100644
index 0000000..e73c1db
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/DRILL_6834_use_no_result_set.sql
@@ -0,0 +1,3 @@
+set `exec.return_result_set_for_ddl` = false;
+use dfs.`drillTestDir`;
+reset `exec.return_result_set_for_ddl`;
\ No newline at end of file
diff --git a/framework/resources/Functional/no_result_set/no_result_set.json b/framework/resources/Functional/no_result_set/no_result_set.json
new file mode 100644
index 0000000..5629cb1
--- /dev/null
+++ b/framework/resources/Functional/no_result_set/no_result_set.json
@@ -0,0 +1,21 @@
+{
+  "testId": "no_result_set",
+  "type": "group",
+  "description": "Test Drill option to not return a result set",
+  "categories": [
+    "functional"
+  ],
+  "matrices": [
+    {
+      "query-file": ".*.sql",
+      "schema": "dfs.drillTestDir",
+      "output-format": "tsv",
+      "expected-file": ".*.e_tsv",
+      "verification-type": [
+        "in-memory"
+      ]
+    }
+  ],
+  "datasources": [
+  ]
+}