Skip to content

Commit 94d60b7

Browse files
adrian-wangmarmbrus
authored andcommitted
[SQL] enable view test
This is a follow up of #3396 , just add a test to white list. Author: Daoyuan Wang <daoyuan.wang@intel.com> Closes #3826 from adrian-wang/viewtest and squashes the following commits: f105f68 [Daoyuan Wang] enable view test
1 parent 480bd1d commit 94d60b7

13 files changed

+61
-1
lines changed

sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
101101
"describe_comment_nonascii",
102102

103103
"create_merge_compressed",
104+
"create_view",
104105
"create_view_partitioned",
105106
"database_location",
106107
"database_properties",
@@ -110,7 +111,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
110111

111112
// Weird DDL differences result in failures on jenkins.
112113
"create_like2",
113-
"create_view_translate",
114114
"partitions_json",
115115

116116
// This test is totally fine except that it includes wrong queries and expects errors, but error
@@ -349,6 +349,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
349349
"create_nested_type",
350350
"create_skewed_table1",
351351
"create_struct_table",
352+
"create_view_translate",
352353
"cross_join",
353354
"cross_product_check_1",
354355
"cross_product_check_2",

sql/hive/src/test/resources/golden/create_view_translate-0-dc7fc9ce5109ef459ee84ccfbb12d2c0

Whitespace-only changes.

sql/hive/src/test/resources/golden/create_view_translate-1-3896ae0e680a5fdc01833533b11c07bb

Whitespace-only changes.

sql/hive/src/test/resources/golden/create_view_translate-10-7016e1e3a4248564f3d08cddad7ae116

Whitespace-only changes.

sql/hive/src/test/resources/golden/create_view_translate-11-e27c6a59a833dcbc2e5cdb7ff7972828

Whitespace-only changes.

sql/hive/src/test/resources/golden/create_view_translate-2-6b4caec6d7e3a91e61720bbd6b7697f0

Whitespace-only changes.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# col_name data_type comment
2+
3+
key string
4+
5+
# Detailed Table Information
6+
Database: default
7+
Owner: animal
8+
CreateTime: Mon Dec 29 00:57:55 PST 2014
9+
LastAccessTime: UNKNOWN
10+
Protect Mode: None
11+
Retention: 0
12+
Table Type: VIRTUAL_VIEW
13+
Table Parameters:
14+
transient_lastDdlTime 1419843475
15+
16+
# Storage Information
17+
SerDe Library: null
18+
InputFormat: org.apache.hadoop.mapred.SequenceFileInputFormat
19+
OutputFormat: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
20+
Compressed: No
21+
Num Buckets: -1
22+
Bucket Columns: []
23+
Sort Columns: []
24+
25+
# View Information
26+
View Original Text: select cast(key as string) from src
27+
View Expanded Text: select cast(`src`.`key` as string) from `default`.`src`

sql/hive/src/test/resources/golden/create_view_translate-4-cefb7530126f9e60cb4a29441d578f23

Whitespace-only changes.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# col_name data_type comment
2+
3+
key int
4+
value string
5+
6+
# Detailed Table Information
7+
Database: default
8+
Owner: animal
9+
CreateTime: Mon Dec 29 00:57:55 PST 2014
10+
LastAccessTime: UNKNOWN
11+
Protect Mode: None
12+
Retention: 0
13+
Table Type: VIRTUAL_VIEW
14+
Table Parameters:
15+
transient_lastDdlTime 1419843475
16+
17+
# Storage Information
18+
SerDe Library: null
19+
InputFormat: org.apache.hadoop.mapred.SequenceFileInputFormat
20+
OutputFormat: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
21+
Compressed: No
22+
Num Buckets: -1
23+
Bucket Columns: []
24+
Sort Columns: []
25+
26+
# View Information
27+
View Original Text: select key, value from (
28+
select key, value from src
29+
) a
30+
View Expanded Text: select key, value from (
31+
select `src`.`key`, `src`.`value` from `default`.`src`
32+
) `a`

sql/hive/src/test/resources/golden/create_view_translate-6-a14cfe3eff322066e61023ec06c7735d

Whitespace-only changes.

0 commit comments

Comments
 (0)