spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hvanhov...@apache.org
Subject [1/2] spark git commit: [SPARK-19589][SQL] Removal of SQLGEN files
Date Tue, 14 Feb 2017 08:35:17 GMT
Repository: spark
Updated Branches:
  refs/heads/master 9b5e460a9 -> 457850e6f


http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/rollup_cube_7_3.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/rollup_cube_7_3.sql b/sql/hive/src/test/resources/sqlgen/rollup_cube_7_3.sql
deleted file mode 100644
index fd01204..0000000
--- a/sql/hive/src/test/resources/sqlgen/rollup_cube_7_3.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT a, b, grouping(a) FROM parquet_t2 GROUP BY cube(a, b)
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `a`, `gen_attr_1` AS `b`, `gen_attr_3` AS `grouping(a)` FROM (SELECT `gen_attr_4` AS `gen_attr_0`, `gen_attr_5` AS `gen_attr_1`, grouping(`gen_attr_4`) AS `gen_attr_3` FROM (SELECT `a` AS `gen_attr_4`, `b` AS `gen_attr_5`, `c` AS `gen_attr_6`, `d` AS `gen_attr_7` FROM `default`.`parquet_t2`) AS gen_subquery_0 GROUP BY `gen_attr_4`, `gen_attr_5` GROUPING SETS((`gen_attr_4`, `gen_attr_5`), (`gen_attr_4`), (`gen_attr_5`), ())) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/rollup_cube_8_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/rollup_cube_8_1.sql b/sql/hive/src/test/resources/sqlgen/rollup_cube_8_1.sql
deleted file mode 100644
index 61c2706..0000000
--- a/sql/hive/src/test/resources/sqlgen/rollup_cube_8_1.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT hkey AS k1, value - 5 AS k2, hash(grouping_id()) AS hgid
-FROM (SELECT hash(key) as hkey, key as value FROM parquet_t1) t GROUP BY hkey, value-5
-WITH ROLLUP
---------------------------------------------------------------------------------
-SELECT `gen_attr_3` AS `k1`, `gen_attr_4` AS `k2`, `gen_attr_5` AS `hgid` FROM (SELECT `gen_attr_6` AS `gen_attr_3`, (`gen_attr_7` - CAST(5 AS BIGINT)) AS `gen_attr_4`, hash(grouping_id()) AS `gen_attr_5` FROM (SELECT hash(`gen_attr_10`) AS `gen_attr_6`, `gen_attr_10` AS `gen_attr_7` FROM (SELECT `key` AS `gen_attr_10`, `value` AS `gen_attr_11` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS t GROUP BY `gen_attr_6`, (`gen_attr_7` - CAST(5 AS BIGINT)) GROUPING SETS((`gen_attr_6`, (`gen_attr_7` - CAST(5 AS BIGINT))), (`gen_attr_6`), ())) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/rollup_cube_8_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/rollup_cube_8_2.sql b/sql/hive/src/test/resources/sqlgen/rollup_cube_8_2.sql
deleted file mode 100644
index 16f254f..0000000
--- a/sql/hive/src/test/resources/sqlgen/rollup_cube_8_2.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT hkey AS k1, value - 5 AS k2, hash(grouping_id()) AS hgid
-FROM (SELECT hash(key) as hkey, key as value FROM parquet_t1) t GROUP BY hkey, value-5
-WITH CUBE
---------------------------------------------------------------------------------
-SELECT `gen_attr_3` AS `k1`, `gen_attr_4` AS `k2`, `gen_attr_5` AS `hgid` FROM (SELECT `gen_attr_6` AS `gen_attr_3`, (`gen_attr_7` - CAST(5 AS BIGINT)) AS `gen_attr_4`, hash(grouping_id()) AS `gen_attr_5` FROM (SELECT hash(`gen_attr_10`) AS `gen_attr_6`, `gen_attr_10` AS `gen_attr_7` FROM (SELECT `key` AS `gen_attr_10`, `value` AS `gen_attr_11` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS t GROUP BY `gen_attr_6`, (`gen_attr_7` - CAST(5 AS BIGINT)) GROUPING SETS((`gen_attr_6`, (`gen_attr_7` - CAST(5 AS BIGINT))), (`gen_attr_6`), ((`gen_attr_7` - CAST(5 AS BIGINT))), ())) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/rollup_cube_9_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/rollup_cube_9_1.sql b/sql/hive/src/test/resources/sqlgen/rollup_cube_9_1.sql
deleted file mode 100644
index cfce175..0000000
--- a/sql/hive/src/test/resources/sqlgen/rollup_cube_9_1.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT t.key - 5, cnt, SUM(cnt)
-FROM (SELECT x.key, COUNT(*) as cnt
-FROM parquet_t1 x JOIN parquet_t1 y ON x.key = y.key GROUP BY x.key) t
-GROUP BY cnt, t.key - 5
-WITH ROLLUP
---------------------------------------------------------------------------------
-SELECT `gen_attr_3` AS `(key - CAST(5 AS BIGINT))`, `gen_attr_0` AS `cnt`, `gen_attr_4` AS `sum(cnt)` FROM (SELECT (`gen_attr_6` - CAST(5 AS BIGINT)) AS `gen_attr_3`, `gen_attr_5` AS `gen_attr_0`, sum(`gen_attr_5`) AS `gen_attr_4` FROM (SELECT `gen_attr_6`, count(1) AS `gen_attr_5` FROM (SELECT `key` AS `gen_attr_6`, `value` AS `gen_attr_10` FROM `default`.`parquet_t1`) AS gen_subquery_0 INNER JOIN (SELECT `key` AS `gen_attr_9`, `value` AS `gen_attr_11` FROM `default`.`parquet_t1`) AS gen_subquery_1 ON (`gen_attr_6` = `gen_attr_9`) GROUP BY `gen_attr_6`) AS t GROUP BY `gen_attr_5`, (`gen_attr_6` - CAST(5 AS BIGINT)) GROUPING SETS((`gen_attr_5`, (`gen_attr_6` - CAST(5 AS BIGINT))), (`gen_attr_5`), ())) AS gen_subquery_2

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/rollup_cube_9_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/rollup_cube_9_2.sql b/sql/hive/src/test/resources/sqlgen/rollup_cube_9_2.sql
deleted file mode 100644
index d950674..0000000
--- a/sql/hive/src/test/resources/sqlgen/rollup_cube_9_2.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT t.key - 5, cnt, SUM(cnt)
-FROM (SELECT x.key, COUNT(*) as cnt
-FROM parquet_t1 x JOIN parquet_t1 y ON x.key = y.key GROUP BY x.key) t
-GROUP BY cnt, t.key - 5
-WITH CUBE
---------------------------------------------------------------------------------
-SELECT `gen_attr_3` AS `(key - CAST(5 AS BIGINT))`, `gen_attr_0` AS `cnt`, `gen_attr_4` AS `sum(cnt)` FROM (SELECT (`gen_attr_6` - CAST(5 AS BIGINT)) AS `gen_attr_3`, `gen_attr_5` AS `gen_attr_0`, sum(`gen_attr_5`) AS `gen_attr_4` FROM (SELECT `gen_attr_6`, count(1) AS `gen_attr_5` FROM (SELECT `key` AS `gen_attr_6`, `value` AS `gen_attr_10` FROM `default`.`parquet_t1`) AS gen_subquery_0 INNER JOIN (SELECT `key` AS `gen_attr_9`, `value` AS `gen_attr_11` FROM `default`.`parquet_t1`) AS gen_subquery_1 ON (`gen_attr_6` = `gen_attr_9`) GROUP BY `gen_attr_6`) AS t GROUP BY `gen_attr_5`, (`gen_attr_6` - CAST(5 AS BIGINT)) GROUPING SETS((`gen_attr_5`, (`gen_attr_6` - CAST(5 AS BIGINT))), (`gen_attr_5`), ((`gen_attr_6` - CAST(5 AS BIGINT))), ())) AS gen_subquery_2

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/script_transformation_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/script_transformation_1.sql b/sql/hive/src/test/resources/sqlgen/script_transformation_1.sql
deleted file mode 100644
index 1736d74..0000000
--- a/sql/hive/src/test/resources/sqlgen/script_transformation_1.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT TRANSFORM (a, b, c, d) USING 'cat' FROM parquet_t2
---------------------------------------------------------------------------------
-SELECT `gen_attr_4` AS `key`, `gen_attr_5` AS `value` FROM (SELECT TRANSFORM (`gen_attr_0`, `gen_attr_1`, `gen_attr_2`, `gen_attr_3`) USING 'cat' AS (`gen_attr_4` string, `gen_attr_5` string) FROM (SELECT `a` AS `gen_attr_0`, `b` AS `gen_attr_1`, `c` AS `gen_attr_2`, `d` AS `gen_attr_3` FROM `default`.`parquet_t2`) AS gen_subquery_0) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/script_transformation_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/script_transformation_2.sql b/sql/hive/src/test/resources/sqlgen/script_transformation_2.sql
deleted file mode 100644
index 07f59d6..0000000
--- a/sql/hive/src/test/resources/sqlgen/script_transformation_2.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT TRANSFORM (*) USING 'cat' FROM parquet_t2
---------------------------------------------------------------------------------
-SELECT `gen_attr_4` AS `key`, `gen_attr_5` AS `value` FROM (SELECT TRANSFORM (`gen_attr_0`, `gen_attr_1`, `gen_attr_2`, `gen_attr_3`) USING 'cat' AS (`gen_attr_4` string, `gen_attr_5` string) FROM (SELECT `a` AS `gen_attr_0`, `b` AS `gen_attr_1`, `c` AS `gen_attr_2`, `d` AS `gen_attr_3` FROM `default`.`parquet_t2`) AS gen_subquery_0) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/script_transformation_alias_list.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/script_transformation_alias_list.sql b/sql/hive/src/test/resources/sqlgen/script_transformation_alias_list.sql
deleted file mode 100644
index fc0cabe..0000000
--- a/sql/hive/src/test/resources/sqlgen/script_transformation_alias_list.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT TRANSFORM (a, b, c, d) USING 'cat' AS (d1, d2, d3, d4) FROM parquet_t2
---------------------------------------------------------------------------------
-SELECT `gen_attr_4` AS `d1`, `gen_attr_5` AS `d2`, `gen_attr_6` AS `d3`, `gen_attr_7` AS `d4` FROM (SELECT TRANSFORM (`gen_attr_0`, `gen_attr_1`, `gen_attr_2`, `gen_attr_3`) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES('field.delim' = '	') USING 'cat' AS (`gen_attr_4` string, `gen_attr_5` string, `gen_attr_6` string, `gen_attr_7` string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES('field.delim' = '	') FROM (SELECT `a` AS `gen_attr_0`, `b` AS `gen_attr_1`, `c` AS `gen_attr_2`, `d` AS `gen_attr_3` FROM `default`.`parquet_t2`) AS gen_subquery_0) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/script_transformation_alias_list_with_type.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/script_transformation_alias_list_with_type.sql b/sql/hive/src/test/resources/sqlgen/script_transformation_alias_list_with_type.sql
deleted file mode 100644
index a45f9a2..0000000
--- a/sql/hive/src/test/resources/sqlgen/script_transformation_alias_list_with_type.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-FROM
-(FROM parquet_t1 SELECT TRANSFORM(key, value) USING 'cat' AS (thing1 int, thing2 string)) t
-SELECT thing1 + 1
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `(thing1 + 1)` FROM (SELECT (`gen_attr_1` + 1) AS `gen_attr_0` FROM (SELECT TRANSFORM (`gen_attr_2`, `gen_attr_3`) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES('field.delim' = '	') USING 'cat' AS (`gen_attr_1` int, `gen_attr_4` string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES('field.delim' = '	') FROM (SELECT `key` AS `gen_attr_2`, `value` AS `gen_attr_3` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS t) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_multiple.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_multiple.sql b/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_multiple.sql
deleted file mode 100644
index 30d37c7..0000000
--- a/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_multiple.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT TRANSFORM (key)
-ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\t'
-USING 'cat' AS (tKey)
-ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\t'
-FROM parquet_t1
---------------------------------------------------------------------------------
-SELECT `gen_attr_1` AS `tKey` FROM (SELECT TRANSFORM (`gen_attr_0`) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\t' USING 'cat' AS (`gen_attr_1` string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\t' FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_2` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_one.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_one.sql b/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_one.sql
deleted file mode 100644
index 0b694e0..0000000
--- a/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_one.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT TRANSFORM (key) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
-USING 'cat' AS (tKey) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
-FROM parquet_t1
---------------------------------------------------------------------------------
-SELECT `gen_attr_1` AS `tKey` FROM (SELECT TRANSFORM (`gen_attr_0`) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' USING 'cat' AS (`gen_attr_1` string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_2` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_serde.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_serde.sql b/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_serde.sql
deleted file mode 100644
index 14cff37..0000000
--- a/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_serde.sql
+++ /dev/null
@@ -1,10 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT TRANSFORM (key, value)
-ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-WITH SERDEPROPERTIES('field.delim' = '|')
-USING 'cat' AS (tKey, tValue)
-ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-WITH SERDEPROPERTIES('field.delim' = '|')
-FROM parquet_t1
---------------------------------------------------------------------------------
-SELECT `gen_attr_2` AS `tKey`, `gen_attr_3` AS `tValue` FROM (SELECT TRANSFORM (`gen_attr_0`, `gen_attr_1`) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES('field.delim' = '|') USING 'cat' AS (`gen_attr_2` string, `gen_attr_3` string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES('field.delim' = '|') FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_without_serde.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_without_serde.sql b/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_without_serde.sql
deleted file mode 100644
index d20caf7..0000000
--- a/sql/hive/src/test/resources/sqlgen/script_transformation_row_format_without_serde.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT TRANSFORM (key, value)
-ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-USING 'cat' AS (tKey, tValue)
-ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-FROM parquet_t1
---------------------------------------------------------------------------------
-SELECT `gen_attr_2` AS `tKey`, `gen_attr_3` AS `tValue` FROM (SELECT TRANSFORM (`gen_attr_0`, `gen_attr_1`) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' USING 'cat' AS (`gen_attr_2` string, `gen_attr_3` string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/select_distinct.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/select_distinct.sql b/sql/hive/src/test/resources/sqlgen/select_distinct.sql
deleted file mode 100644
index 09d93ca..0000000
--- a/sql/hive/src/test/resources/sqlgen/select_distinct.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT DISTINCT id FROM parquet_t0
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM (SELECT DISTINCT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0`) AS gen_subquery_0) AS parquet_t0

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/select_orc_table.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/select_orc_table.sql b/sql/hive/src/test/resources/sqlgen/select_orc_table.sql
deleted file mode 100644
index 18ff021..0000000
--- a/sql/hive/src/test/resources/sqlgen/select_orc_table.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select * from orc_t
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `c1`, `gen_attr_1` AS `c2` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `c1` AS `gen_attr_0`, `c2` AS `gen_attr_1` FROM `default`.`orc_t`) AS gen_subquery_0) AS orc_t

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/select_parquet_table.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/select_parquet_table.sql b/sql/hive/src/test/resources/sqlgen/select_parquet_table.sql
deleted file mode 100644
index d2eac9c..0000000
--- a/sql/hive/src/test/resources/sqlgen/select_parquet_table.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select * from parquet_t
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `c1`, `gen_attr_1` AS `c2` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `c1` AS `gen_attr_0`, `c2` AS `gen_attr_1` FROM `default`.`parquet_t`) AS gen_subquery_0) AS parquet_t

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/self_join.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/self_join.sql b/sql/hive/src/test/resources/sqlgen/self_join.sql
deleted file mode 100644
index d6dcee2..0000000
--- a/sql/hive/src/test/resources/sqlgen/self_join.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT x.key FROM parquet_t1 x JOIN parquet_t1 y ON x.key = y.key
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key` FROM (SELECT `gen_attr_0` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_2` FROM `default`.`parquet_t1`) AS gen_subquery_0 INNER JOIN (SELECT `key` AS `gen_attr_1`, `value` AS `gen_attr_3` FROM `default`.`parquet_t1`) AS gen_subquery_1 ON (`gen_attr_0` = `gen_attr_1`)) AS x

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/self_join_with_group_by.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/self_join_with_group_by.sql b/sql/hive/src/test/resources/sqlgen/self_join_with_group_by.sql
deleted file mode 100644
index 1dedb44..0000000
--- a/sql/hive/src/test/resources/sqlgen/self_join_with_group_by.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT x.key, COUNT(*) FROM parquet_t1 x JOIN parquet_t1 y ON x.key = y.key group by x.key
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `count(1)` FROM (SELECT `gen_attr_0`, count(1) AS `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_3` FROM `default`.`parquet_t1`) AS gen_subquery_0 INNER JOIN (SELECT `key` AS `gen_attr_2`, `value` AS `gen_attr_4` FROM `default`.`parquet_t1`) AS gen_subquery_1 ON (`gen_attr_0` = `gen_attr_2`) GROUP BY `gen_attr_0`) AS x

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/sort_asc_nulls_last.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/sort_asc_nulls_last.sql b/sql/hive/src/test/resources/sqlgen/sort_asc_nulls_last.sql
deleted file mode 100644
index da4e367..0000000
--- a/sql/hive/src/test/resources/sqlgen/sort_asc_nulls_last.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT COUNT(value) FROM parquet_t1 GROUP BY key ORDER BY key nulls last, MAX(key)
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `count(value)` FROM (SELECT `gen_attr_0` FROM (SELECT count(`gen_attr_4`) AS `gen_attr_0`, `gen_attr_3` AS `gen_attr_1`, max(`gen_attr_3`) AS `gen_attr_2` FROM (SELECT `key` AS `gen_attr_3`, `value` AS `gen_attr_4` FROM `default`.`parquet_t1`) AS gen_subquery_0 GROUP BY `gen_attr_3` ORDER BY `gen_attr_1` ASC NULLS LAST, `gen_attr_2` ASC NULLS FIRST) AS gen_subquery_1) AS gen_subquery_2

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/sort_by_after_having.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/sort_by_after_having.sql b/sql/hive/src/test/resources/sqlgen/sort_by_after_having.sql
deleted file mode 100644
index a4f3ddc..0000000
--- a/sql/hive/src/test/resources/sqlgen/sort_by_after_having.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT COUNT(value) FROM parquet_t1 GROUP BY key HAVING MAX(key) > 0 SORT BY key
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `count(value)` FROM (SELECT `gen_attr_0` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT count(`gen_attr_3`) AS `gen_attr_0`, max(`gen_attr_1`) AS `gen_attr_2`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_1`, `value` AS `gen_attr_3` FROM `default`.`parquet_t1`) AS gen_subquery_0 GROUP BY `gen_attr_1` HAVING (`gen_attr_2` > CAST(0 AS BIGINT))) AS gen_subquery_1 SORT BY `gen_attr_1` ASC NULLS FIRST) AS gen_subquery_2) AS gen_subquery_3

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/sort_desc_nulls_first.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/sort_desc_nulls_first.sql b/sql/hive/src/test/resources/sqlgen/sort_desc_nulls_first.sql
deleted file mode 100644
index d995e3b..0000000
--- a/sql/hive/src/test/resources/sqlgen/sort_desc_nulls_first.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT COUNT(value) FROM parquet_t1 GROUP BY key ORDER BY key desc nulls first,MAX(key)
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `count(value)` FROM (SELECT `gen_attr_0` FROM (SELECT count(`gen_attr_4`) AS `gen_attr_0`, `gen_attr_3` AS `gen_attr_1`, max(`gen_attr_3`) AS `gen_attr_2` FROM (SELECT `key` AS `gen_attr_3`, `value` AS `gen_attr_4` FROM `default`.`parquet_t1`) AS gen_subquery_0 GROUP BY `gen_attr_3` ORDER BY `gen_attr_1` DESC NULLS FIRST, `gen_attr_2` ASC NULLS FIRST) AS gen_subquery_1) AS gen_subquery_2

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subq2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subq2.sql b/sql/hive/src/test/resources/sqlgen/subq2.sql
deleted file mode 100644
index ee7e80c..0000000
--- a/sql/hive/src/test/resources/sqlgen/subq2.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT a.k, a.c
-FROM (SELECT b.key as k, count(1) as c
-      FROM src b
-      GROUP BY b.key) a
-WHERE a.k >= 90
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `k`, `gen_attr_1` AS `c` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `gen_attr_2` AS `gen_attr_0`, count(1) AS `gen_attr_1` FROM (SELECT `key` AS `gen_attr_2`, `value` AS `gen_attr_3` FROM `default`.`src`) AS gen_subquery_0 GROUP BY `gen_attr_2`) AS a WHERE (`gen_attr_0` >= 90)) AS a

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_exists_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_exists_1.sql b/sql/hive/src/test/resources/sqlgen/subquery_exists_1.sql
deleted file mode 100644
index bd28d8d..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_exists_1.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select *
-from src b
-where exists (select a.key
-              from src a
-              where b.value = a.value and a.key = b.key and a.value > 'val_9')
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`src`) AS gen_subquery_0 WHERE EXISTS(SELECT `gen_attr_4` AS `1` FROM (SELECT 1 AS `gen_attr_4` FROM (SELECT `gen_attr_3`, `gen_attr_2` FROM (SELECT `key` AS `gen_attr_3`, `value` AS `gen_attr_2` FROM `default`.`src`) AS gen_subquery_2 WHERE (`gen_attr_2` > 'val_9')) AS gen_subquery_1 WHERE ((`gen_attr_1` = `gen_attr_2`) AND (`gen_attr_3` = `gen_attr_0`))) AS gen_subquery_3)) AS b

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_exists_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_exists_2.sql b/sql/hive/src/test/resources/sqlgen/subquery_exists_2.sql
deleted file mode 100644
index d2965fc..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_exists_2.sql
+++ /dev/null
@@ -1,9 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select *
-from (select *
-      from src b
-      where exists (select a.key
-                    from src a
-                    where b.value = a.value and a.key = b.key and a.value > 'val_9')) a
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`src`) AS gen_subquery_0 WHERE EXISTS(SELECT `gen_attr_4` AS `1` FROM (SELECT 1 AS `gen_attr_4` FROM (SELECT `gen_attr_3`, `gen_attr_2` FROM (SELECT `key` AS `gen_attr_3`, `value` AS `gen_attr_2` FROM `default`.`src`) AS gen_subquery_2 WHERE (`gen_attr_2` > 'val_9')) AS gen_subquery_1 WHERE ((`gen_attr_1` = `gen_attr_2`) AND (`gen_attr_3` = `gen_attr_0`))) AS gen_subquery_3)) AS a) AS a

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_exists_having_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_exists_having_1.sql b/sql/hive/src/test/resources/sqlgen/subquery_exists_having_1.sql
deleted file mode 100644
index 93ce902..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_exists_having_1.sql
+++ /dev/null
@@ -1,9 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select b.key, count(*)
-from src b
-group by b.key
-having exists (select a.key
-               from src a
-               where a.key = b.key and a.value > 'val_9')
---------------------------------------------------------------------------------
-SELECT `gen_attr_1` AS `key`, `gen_attr_2` AS `count(1)` FROM (SELECT `gen_attr_1`, count(1) AS `gen_attr_2` FROM (SELECT `key` AS `gen_attr_1`, `value` AS `gen_attr_3` FROM `default`.`src`) AS gen_subquery_0 GROUP BY `gen_attr_1` HAVING EXISTS(SELECT `gen_attr_4` AS `1` FROM (SELECT 1 AS `gen_attr_4` FROM (SELECT `gen_attr_0` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_5` FROM `default`.`src`) AS gen_subquery_2 WHERE (`gen_attr_5` > 'val_9')) AS gen_subquery_1 WHERE (`gen_attr_0` = `gen_attr_1`)) AS gen_subquery_3)) AS b

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_exists_having_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_exists_having_2.sql b/sql/hive/src/test/resources/sqlgen/subquery_exists_having_2.sql
deleted file mode 100644
index 411e073..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_exists_having_2.sql
+++ /dev/null
@@ -1,10 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select *
-from (select b.key, count(*)
-      from src b
-      group by b.key
-      having exists (select a.key
-                     from src a
-                     where a.key = b.key and a.value > 'val_9')) a
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `count(1)` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `gen_attr_0`, count(1) AS `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_3` FROM `default`.`src`) AS gen_subquery_0 GROUP BY `gen_attr_0` HAVING EXISTS(SELECT `gen_attr_4` AS `1` FROM (SELECT 1 AS `gen_attr_4` FROM (SELECT `gen_attr_2` FROM (SELECT `key` AS `gen_attr_2`, `value` AS `gen_attr_5` FROM `default`.`src`) AS gen_subquery_2 WHERE (`gen_attr_5` > 'val_9')) AS gen_subquery_1 WHERE (`gen_attr_2` = `gen_attr_0`)) AS gen_subquery_3)) AS a) AS a

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_exists_having_3.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_exists_having_3.sql b/sql/hive/src/test/resources/sqlgen/subquery_exists_having_3.sql
deleted file mode 100644
index b2ed0b0..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_exists_having_3.sql
+++ /dev/null
@@ -1,9 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select b.key, min(b.value)
-from src b
-group by b.key
-having exists (select a.key
-               from src a
-               where a.value > 'val_9' and a.value = min(b.value))
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `min(value)` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `gen_attr_0`, min(`gen_attr_4`) AS `gen_attr_1`, min(`gen_attr_4`) AS `gen_attr_3` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_4` FROM `default`.`src`) AS gen_subquery_0 GROUP BY `gen_attr_0` HAVING EXISTS(SELECT `gen_attr_5` AS `1` FROM (SELECT 1 AS `gen_attr_5` FROM (SELECT `gen_attr_6`, `gen_attr_2` FROM (SELECT `key` AS `gen_attr_6`, `value` AS `gen_attr_2` FROM `default`.`src`) AS gen_subquery_3 WHERE (`gen_attr_2` > 'val_9')) AS gen_subquery_2 WHERE (`gen_attr_2` = `gen_attr_3`)) AS gen_subquery_4)) AS gen_subquery_1) AS b

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_in.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_in.sql b/sql/hive/src/test/resources/sqlgen/subquery_in.sql
deleted file mode 100644
index 0fe6224..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_in.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT key
-FROM src
-WHERE key in (SELECT max(key) FROM src)
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key` FROM (SELECT `gen_attr_0` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_2` FROM `default`.`src`) AS gen_subquery_0 WHERE (`gen_attr_0` IN (SELECT `gen_attr_3` AS `_c0` FROM (SELECT `gen_attr_1` AS `gen_attr_3` FROM (SELECT max(`gen_attr_4`) AS `gen_attr_1` FROM (SELECT `key` AS `gen_attr_4`, `value` AS `gen_attr_5` FROM `default`.`src`) AS gen_subquery_2) AS gen_subquery_1) AS gen_subquery_3))) AS src

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_in_having_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_in_having_1.sql b/sql/hive/src/test/resources/sqlgen/subquery_in_having_1.sql
deleted file mode 100644
index 55afb86..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_in_having_1.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select key, count(*)
-from src
-group by key
-having count(*) in (select count(*) from src s1 where s1.key = '90' group by s1.key)
-order by key
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `count(1)` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `gen_attr_0`, count(1) AS `gen_attr_1`, count(1) AS `gen_attr_2` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_4` FROM `default`.`src`) AS gen_subquery_0 GROUP BY `gen_attr_0` HAVING (`gen_attr_2` IN (SELECT `gen_attr_5` AS `_c0` FROM (SELECT `gen_attr_3` AS `gen_attr_5` FROM (SELECT count(1) AS `gen_attr_3` FROM (SELECT `key` AS `gen_attr_6`, `value` AS `gen_attr_7` FROM `default`.`src`) AS gen_subquery_3 WHERE (`gen_attr_6` = CAST('90' AS INT)) GROUP BY `gen_attr_6`) AS gen_subquery_2) AS gen_subquery_4))) AS gen_subquery_1 ORDER BY `gen_attr_0` ASC NULLS FIRST) AS src

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_in_having_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_in_having_2.sql b/sql/hive/src/test/resources/sqlgen/subquery_in_having_2.sql
deleted file mode 100644
index cdda29a..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_in_having_2.sql
+++ /dev/null
@@ -1,10 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select b.key, min(b.value)
-from src b
-group by b.key
-having b.key in (select a.key
-                 from src a
-                 where a.value > 'val_9' and a.value = min(b.value))
-order by b.key
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `min(value)` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `gen_attr_0`, min(`gen_attr_5`) AS `gen_attr_1`, min(`gen_attr_5`) AS `gen_attr_4` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_5` FROM `default`.`src`) AS gen_subquery_0 GROUP BY `gen_attr_0` HAVING (named_struct('gen_attr_0', `gen_attr_0`, 'gen_attr_4', `gen_attr_4`) IN (SELECT `gen_attr_6` AS `_c0`, `gen_attr_7` AS `_c1` FROM (SELECT `gen_attr_2` AS `gen_attr_6`, `gen_attr_3` AS `gen_attr_7` FROM (SELECT `gen_attr_2`, `gen_attr_3` FROM (SELECT `key` AS `gen_attr_2`, `value` AS `gen_attr_3` FROM `default`.`src`) AS gen_subquery_3 WHERE (`gen_attr_3` > 'val_9')) AS gen_subquery_2) AS gen_subquery_4))) AS gen_subquery_1 ORDER BY `gen_attr_0` ASC NULLS FIRST) AS b

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_not_exists_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_not_exists_1.sql b/sql/hive/src/test/resources/sqlgen/subquery_not_exists_1.sql
deleted file mode 100644
index eed20a5..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_not_exists_1.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select *
-from src b
-where not exists (select a.key
-                  from src a
-                  where b.value = a.value  and a.key = b.key and a.value > 'val_2')
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`src`) AS gen_subquery_0 WHERE (NOT EXISTS(SELECT `gen_attr_4` AS `1` FROM (SELECT 1 AS `gen_attr_4` FROM (SELECT `gen_attr_3`, `gen_attr_2` FROM (SELECT `key` AS `gen_attr_3`, `value` AS `gen_attr_2` FROM `default`.`src`) AS gen_subquery_2 WHERE (`gen_attr_2` > 'val_2')) AS gen_subquery_1 WHERE ((`gen_attr_1` = `gen_attr_2`) AND (`gen_attr_3` = `gen_attr_0`))) AS gen_subquery_3))) AS b

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_not_exists_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_not_exists_2.sql b/sql/hive/src/test/resources/sqlgen/subquery_not_exists_2.sql
deleted file mode 100644
index 7040e10..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_not_exists_2.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select *
-from src b
-where not exists (select a.key
-                  from src a
-                  where b.value = a.value and a.value > 'val_2')
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`src`) AS gen_subquery_0 WHERE (NOT EXISTS(SELECT `gen_attr_3` AS `1` FROM (SELECT 1 AS `gen_attr_3` FROM (SELECT `gen_attr_4`, `gen_attr_2` FROM (SELECT `key` AS `gen_attr_4`, `value` AS `gen_attr_2` FROM `default`.`src`) AS gen_subquery_2 WHERE (`gen_attr_2` > 'val_2')) AS gen_subquery_1 WHERE (`gen_attr_1` = `gen_attr_2`)) AS gen_subquery_3))) AS b

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_not_exists_having_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_not_exists_having_1.sql b/sql/hive/src/test/resources/sqlgen/subquery_not_exists_having_1.sql
deleted file mode 100644
index 3c0e90e..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_not_exists_having_1.sql
+++ /dev/null
@@ -1,9 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select *
-from src b
-group by key, value
-having not exists (select a.key
-                   from src a
-                   where b.value = a.value  and a.key = b.key and a.value > 'val_12')
---------------------------------------------------------------------------------
-SELECT `gen_attr_3` AS `key`, `gen_attr_0` AS `value` FROM (SELECT `gen_attr_3`, `gen_attr_0` FROM (SELECT `key` AS `gen_attr_3`, `value` AS `gen_attr_0` FROM `default`.`src`) AS gen_subquery_0 GROUP BY `gen_attr_3`, `gen_attr_0` HAVING (NOT EXISTS(SELECT `gen_attr_4` AS `1` FROM (SELECT 1 AS `gen_attr_4` FROM (SELECT `gen_attr_2`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_2`, `value` AS `gen_attr_1` FROM `default`.`src`) AS gen_subquery_2 WHERE (`gen_attr_1` > 'val_12')) AS gen_subquery_1 WHERE ((`gen_attr_0` = `gen_attr_1`) AND (`gen_attr_2` = `gen_attr_3`))) AS gen_subquery_3))) AS b

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/subquery_not_exists_having_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/subquery_not_exists_having_2.sql b/sql/hive/src/test/resources/sqlgen/subquery_not_exists_having_2.sql
deleted file mode 100644
index 0c16f9e..0000000
--- a/sql/hive/src/test/resources/sqlgen/subquery_not_exists_having_2.sql
+++ /dev/null
@@ -1,9 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-select *
-from src b
-group by key, value
-having not exists (select distinct a.key
-                   from src a
-                   where b.value = a.value and a.value > 'val_12')
---------------------------------------------------------------------------------
-SELECT `gen_attr_2` AS `key`, `gen_attr_0` AS `value` FROM (SELECT `gen_attr_2`, `gen_attr_0` FROM (SELECT `key` AS `gen_attr_2`, `value` AS `gen_attr_0` FROM `default`.`src`) AS gen_subquery_0 GROUP BY `gen_attr_2`, `gen_attr_0` HAVING (NOT EXISTS(SELECT `gen_attr_3` AS `1` FROM (SELECT 1 AS `gen_attr_3` FROM (SELECT DISTINCT `gen_attr_4`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_4`, `value` AS `gen_attr_1` FROM `default`.`src`) AS gen_subquery_2 WHERE (`gen_attr_1` > 'val_12')) AS gen_subquery_1 WHERE (`gen_attr_0` = `gen_attr_1`)) AS gen_subquery_3))) AS b

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/tablesample_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/tablesample_1.sql b/sql/hive/src/test/resources/sqlgen/tablesample_1.sql
deleted file mode 100644
index 291f2f5..0000000
--- a/sql/hive/src/test/resources/sqlgen/tablesample_1.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT s.id FROM parquet_t0 TABLESAMPLE(100 PERCENT) s
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM (SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0` TABLESAMPLE(100.0 PERCENT)) AS gen_subquery_0) AS s

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/tablesample_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/tablesample_2.sql b/sql/hive/src/test/resources/sqlgen/tablesample_2.sql
deleted file mode 100644
index 6a92d7a..0000000
--- a/sql/hive/src/test/resources/sqlgen/tablesample_2.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT * FROM parquet_t0 TABLESAMPLE(100 PERCENT)
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM (SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0` TABLESAMPLE(100.0 PERCENT)) AS gen_subquery_0) AS parquet_t0

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/tablesample_3.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/tablesample_3.sql b/sql/hive/src/test/resources/sqlgen/tablesample_3.sql
deleted file mode 100644
index 4a17d71..0000000
--- a/sql/hive/src/test/resources/sqlgen/tablesample_3.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT s.id FROM t0 TABLESAMPLE(100 PERCENT) s
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM (SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`t0` TABLESAMPLE(100.0 PERCENT)) AS gen_subquery_0) AS s

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/tablesample_4.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/tablesample_4.sql b/sql/hive/src/test/resources/sqlgen/tablesample_4.sql
deleted file mode 100644
index 873de05..0000000
--- a/sql/hive/src/test/resources/sqlgen/tablesample_4.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT * FROM t0 TABLESAMPLE(100 PERCENT)
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM (SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`t0` TABLESAMPLE(100.0 PERCENT)) AS gen_subquery_0) AS t0

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/tablesample_5.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/tablesample_5.sql b/sql/hive/src/test/resources/sqlgen/tablesample_5.sql
deleted file mode 100644
index f958b2f..0000000
--- a/sql/hive/src/test/resources/sqlgen/tablesample_5.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT s.id FROM parquet_t0 TABLESAMPLE(0.1 PERCENT) s WHERE 1=0
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM (SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0` TABLESAMPLE(0.1 PERCENT)) AS gen_subquery_0 WHERE (1 = 0)) AS s

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/tablesample_6.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/tablesample_6.sql b/sql/hive/src/test/resources/sqlgen/tablesample_6.sql
deleted file mode 100644
index 688a102..0000000
--- a/sql/hive/src/test/resources/sqlgen/tablesample_6.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT * FROM parquet_t0 TABLESAMPLE(0.1 PERCENT) WHERE 1=0
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM (SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0` TABLESAMPLE(0.1 PERCENT)) AS gen_subquery_0 WHERE (1 = 0)) AS parquet_t0

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/three_child_union.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/three_child_union.sql b/sql/hive/src/test/resources/sqlgen/three_child_union.sql
deleted file mode 100644
index 713c750..0000000
--- a/sql/hive/src/test/resources/sqlgen/three_child_union.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT id FROM parquet_t0
-UNION ALL SELECT id FROM parquet_t0
-UNION ALL SELECT id FROM parquet_t0
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM ((SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0`) AS gen_subquery_0) UNION ALL (SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0`) AS gen_subquery_1) UNION ALL (SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0`) AS gen_subquery_2)) AS parquet_t0

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/type_widening.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/type_widening.sql b/sql/hive/src/test/resources/sqlgen/type_widening.sql
deleted file mode 100644
index ebb8a92..0000000
--- a/sql/hive/src/test/resources/sqlgen/type_widening.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT id FROM parquet_t0 UNION ALL SELECT CAST(id AS INT) AS id FROM parquet_t0
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM ((SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0`) AS gen_subquery_0) UNION ALL (SELECT CAST(CAST(`gen_attr_0` AS INT) AS BIGINT) AS `gen_attr_1` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`parquet_t0`) AS gen_subquery_1)) AS parquet_t0

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/union_distinct.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/union_distinct.sql b/sql/hive/src/test/resources/sqlgen/union_distinct.sql
deleted file mode 100644
index 46644b8..0000000
--- a/sql/hive/src/test/resources/sqlgen/union_distinct.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT * FROM t0 UNION SELECT * FROM t0
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `id` FROM ((SELECT `gen_attr_0` FROM (SELECT `id` AS `gen_attr_0` FROM `default`.`t0`) AS gen_subquery_0) UNION DISTINCT (SELECT `gen_attr_1` FROM (SELECT `id` AS `gen_attr_1` FROM `default`.`t0`) AS gen_subquery_1)) AS t0

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_basic_1.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_basic_1.sql b/sql/hive/src/test/resources/sqlgen/window_basic_1.sql
deleted file mode 100644
index 000c4e7..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_basic_1.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT MAX(value) OVER (PARTITION BY key % 3) FROM parquet_t1
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `max(value) OVER (PARTITION BY (key % CAST(3 AS BIGINT)) ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)` FROM (SELECT `gen_attr_0` FROM (SELECT gen_subquery_1.`gen_attr_1`, gen_subquery_1.`gen_attr_2`, max(`gen_attr_1`) OVER (PARTITION BY `gen_attr_2` ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS `gen_attr_0` FROM (SELECT `gen_attr_1`, (`gen_attr_3` % CAST(3 AS BIGINT)) AS `gen_attr_2` FROM (SELECT `key` AS `gen_attr_3`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1) AS gen_subquery_2) AS gen_subquery_3

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_basic_2.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_basic_2.sql b/sql/hive/src/test/resources/sqlgen/window_basic_2.sql
deleted file mode 100644
index 0e2a9a5..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_basic_2.sql
+++ /dev/null
@@ -1,5 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT key, value, ROUND(AVG(key) OVER (), 2)
-FROM parquet_t1 ORDER BY key
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value`, `gen_attr_2` AS `round(avg(key) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING), 2)` FROM (SELECT `gen_attr_0`, `gen_attr_1`, round(`gen_attr_3`, 2) AS `gen_attr_2` FROM (SELECT gen_subquery_1.`gen_attr_0`, gen_subquery_1.`gen_attr_1`, avg(`gen_attr_0`) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS `gen_attr_3` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1) AS gen_subquery_2 ORDER BY `gen_attr_0` ASC NULLS FIRST) AS parquet_t1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_basic_3.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_basic_3.sql b/sql/hive/src/test/resources/sqlgen/window_basic_3.sql
deleted file mode 100644
index d727caa..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_basic_3.sql
+++ /dev/null
@@ -1,5 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT value, MAX(key + 1) OVER (PARTITION BY key % 5 ORDER BY key % 7) AS max
-FROM parquet_t1
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `value`, `gen_attr_1` AS `max` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT gen_subquery_1.`gen_attr_0`, gen_subquery_1.`gen_attr_2`, gen_subquery_1.`gen_attr_3`, gen_subquery_1.`gen_attr_4`, max(`gen_attr_2`) OVER (PARTITION BY `gen_attr_3` ORDER BY `gen_attr_4` ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `gen_attr_1` FROM (SELECT `gen_attr_0`, (`gen_attr_5` + CAST(1 AS BIGINT)) AS `gen_attr_2`, (`gen_attr_5` % CAST(5 AS BIGINT)) AS `gen_attr_3`, (`gen_attr_5` % CAST(7 AS BIGINT)) AS `gen_attr_4` FROM (SELECT `key` AS `gen_attr_5`, `value` AS `gen_attr_0` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1) AS gen_subquery_2) AS parquet_t1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_basic_asc_nulls_last.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_basic_asc_nulls_last.sql b/sql/hive/src/test/resources/sqlgen/window_basic_asc_nulls_last.sql
deleted file mode 100644
index 4739f05..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_basic_asc_nulls_last.sql
+++ /dev/null
@@ -1,5 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT key, value, ROUND(AVG(key) OVER (), 2)
-FROM parquet_t1 ORDER BY key nulls last
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value`, `gen_attr_2` AS `round(avg(key) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING), 2)` FROM (SELECT `gen_attr_0`, `gen_attr_1`, round(`gen_attr_3`, 2) AS `gen_attr_2` FROM (SELECT gen_subquery_1.`gen_attr_0`, gen_subquery_1.`gen_attr_1`, avg(`gen_attr_0`) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS `gen_attr_3` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1) AS gen_subquery_2 ORDER BY `gen_attr_0` ASC NULLS LAST) AS parquet_t1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_basic_desc_nulls_first.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_basic_desc_nulls_first.sql b/sql/hive/src/test/resources/sqlgen/window_basic_desc_nulls_first.sql
deleted file mode 100644
index 1b9db29..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_basic_desc_nulls_first.sql
+++ /dev/null
@@ -1,5 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT key, value, ROUND(AVG(key) OVER (), 2)
-FROM parquet_t1 ORDER BY key desc nulls first
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value`, `gen_attr_2` AS `round(avg(key) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING), 2)` FROM (SELECT `gen_attr_0`, `gen_attr_1`, round(`gen_attr_3`, 2) AS `gen_attr_2` FROM (SELECT gen_subquery_1.`gen_attr_0`, gen_subquery_1.`gen_attr_1`, avg(`gen_attr_0`) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS `gen_attr_3` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1) AS gen_subquery_2 ORDER BY `gen_attr_0` DESC NULLS FIRST) AS parquet_t1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_with_join.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_with_join.sql b/sql/hive/src/test/resources/sqlgen/window_with_join.sql
deleted file mode 100644
index 43d5b47..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_with_join.sql
+++ /dev/null
@@ -1,5 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT x.key, MAX(y.key) OVER (PARTITION BY x.key % 5 ORDER BY x.key)
-FROM parquet_t1 x JOIN parquet_t1 y ON x.key = y.key
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `max(key) OVER (PARTITION BY (key % CAST(5 AS BIGINT)) ORDER BY key ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT gen_subquery_2.`gen_attr_0`, gen_subquery_2.`gen_attr_2`, gen_subquery_2.`gen_attr_3`, max(`gen_attr_2`) OVER (PARTITION BY `gen_attr_3` ORDER BY `gen_attr_0` ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `gen_attr_1` FROM (SELECT `gen_attr_0`, `gen_attr_2`, (`gen_attr_0` % CAST(5 AS BIGINT)) AS `gen_attr_3` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_4` FROM `default`.`parquet_t1`) AS gen_subquery_0 INNER JOIN (SELECT `key` AS `gen_attr_2`, `value` AS `gen_attr_5` FROM `default`.`parquet_t1`) AS gen_subquery_1 ON (`gen_attr_0` = `gen_attr_2`)) AS gen_subquery_2) AS gen_subquery_3) AS x

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg.sql b/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg.sql
deleted file mode 100644
index 33a8e83..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg.sql
+++ /dev/null
@@ -1,7 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT key, value,
-DENSE_RANK() OVER (DISTRIBUTE BY key SORT BY key, value) AS dr,
-COUNT(key)
-FROM parquet_t1 GROUP BY key, value
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value`, `gen_attr_2` AS `dr`, `gen_attr_3` AS `count(key)` FROM (SELECT `gen_attr_0`, `gen_attr_1`, `gen_attr_2`, `gen_attr_3` FROM (SELECT gen_subquery_1.`gen_attr_0`, gen_subquery_1.`gen_attr_1`, gen_subquery_1.`gen_attr_3`, DENSE_RANK() OVER (PARTITION BY `gen_attr_0` ORDER BY `gen_attr_0` ASC NULLS FIRST, `gen_attr_1` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `gen_attr_2` FROM (SELECT `gen_attr_0`, `gen_attr_1`, count(`gen_attr_0`) AS `gen_attr_3` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0 GROUP BY `gen_attr_0`, `gen_attr_1`) AS gen_subquery_1) AS gen_subquery_2) AS parquet_t1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_filter.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_filter.sql b/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_filter.sql
deleted file mode 100644
index e01bc03..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_filter.sql
+++ /dev/null
@@ -1,7 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT key, value,
-DENSE_RANK() OVER (DISTRIBUTE BY key SORT BY key, value) AS dr,
-COUNT(key) OVER(DISTRIBUTE BY key SORT BY key, value) AS ca
-FROM parquet_t1
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value`, `gen_attr_2` AS `dr`, `gen_attr_3` AS `ca` FROM (SELECT `gen_attr_0`, `gen_attr_1`, `gen_attr_2`, `gen_attr_3` FROM (SELECT gen_subquery_1.`gen_attr_0`, gen_subquery_1.`gen_attr_1`, DENSE_RANK() OVER (PARTITION BY `gen_attr_0` ORDER BY `gen_attr_0` ASC NULLS FIRST, `gen_attr_1` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `gen_attr_2`, count(`gen_attr_0`) OVER (PARTITION BY `gen_attr_0` ORDER BY `gen_attr_0` ASC NULLS FIRST, `gen_attr_1` ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `gen_attr_3` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0) AS gen_subquery_1) AS gen_subquery_2) AS parquet_t1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_functions.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_functions.sql b/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_functions.sql
deleted file mode 100644
index dbfa408..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_functions.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT key, value,
-MAX(value) OVER (PARTITION BY key % 5 ORDER BY key) AS max
-FROM parquet_t1 GROUP BY key, value
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value`, `gen_attr_2` AS `max` FROM (SELECT `gen_attr_0`, `gen_attr_1`, `gen_attr_2` FROM (SELECT gen_subquery_1.`gen_attr_0`, gen_subquery_1.`gen_attr_1`, gen_subquery_1.`gen_attr_3`, max(`gen_attr_1`) OVER (PARTITION BY `gen_attr_3` ORDER BY `gen_attr_0` ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `gen_attr_2` FROM (SELECT `gen_attr_0`, `gen_attr_1`, (`gen_attr_0` % CAST(5 AS BIGINT)) AS `gen_attr_3` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0 GROUP BY `gen_attr_0`, `gen_attr_1`) AS gen_subquery_1) AS gen_subquery_2) AS parquet_t1

http://git-wip-us.apache.org/repos/asf/spark/blob/457850e6/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_having.sql
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_having.sql b/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_having.sql
deleted file mode 100644
index 6f5741b..0000000
--- a/sql/hive/src/test/resources/sqlgen/window_with_the_same_window_with_agg_having.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- This file is automatically generated by LogicalPlanToSQLSuite.
-SELECT key, value,
-MAX(value) OVER (PARTITION BY key % 5 ORDER BY key DESC) AS max
-FROM parquet_t1 GROUP BY key, value HAVING key > 5
---------------------------------------------------------------------------------
-SELECT `gen_attr_0` AS `key`, `gen_attr_1` AS `value`, `gen_attr_2` AS `max` FROM (SELECT `gen_attr_0`, `gen_attr_1`, `gen_attr_2` FROM (SELECT gen_subquery_1.`gen_attr_0`, gen_subquery_1.`gen_attr_1`, gen_subquery_1.`gen_attr_3`, max(`gen_attr_1`) OVER (PARTITION BY `gen_attr_3` ORDER BY `gen_attr_0` DESC NULLS LAST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `gen_attr_2` FROM (SELECT `gen_attr_0`, `gen_attr_1`, (`gen_attr_0` % CAST(5 AS BIGINT)) AS `gen_attr_3` FROM (SELECT `key` AS `gen_attr_0`, `value` AS `gen_attr_1` FROM `default`.`parquet_t1`) AS gen_subquery_0 GROUP BY `gen_attr_0`, `gen_attr_1` HAVING (`gen_attr_0` > CAST(5 AS BIGINT))) AS gen_subquery_1) AS gen_subquery_2) AS parquet_t1


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message