aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/compatibility/src/test/scala
diff options
context:
space:
mode:
authorMichael Armbrust <michael@databricks.com>2014-10-24 18:36:35 -0700
committerJosh Rosen <joshrosen@databricks.com>2014-10-24 18:36:35 -0700
commit3a845d3c048eebb0bddb3937128746fde3e8e4d8 (patch)
tree192dbba101a08ff02de979efba297587f30fd721 /sql/hive/compatibility/src/test/scala
parent898b22ab1fe90e8a3935b19566465046f2256fa6 (diff)
downloadspark-3a845d3c048eebb0bddb3937128746fde3e8e4d8.tar.gz
spark-3a845d3c048eebb0bddb3937128746fde3e8e4d8.tar.bz2
spark-3a845d3c048eebb0bddb3937128746fde3e8e4d8.zip
[SQL] Update Hive test harness for Hive 12 and 13
As part of the upgrade I also copy the newest version of the query tests, and whitelist a bunch of new ones that are now passing. Author: Michael Armbrust <michael@databricks.com> Closes #2936 from marmbrus/fix13tests and squashes the following commits: d9cbdab [Michael Armbrust] Remove user specific tests 65801cd [Michael Armbrust] style and rat 8f6b09a [Michael Armbrust] Update test harness to work with both Hive 12 and 13. f044843 [Michael Armbrust] Update Hive query tests and golden files to 0.13
Diffstat (limited to 'sql/hive/compatibility/src/test/scala')
-rw-r--r--sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala104
1 files changed, 70 insertions, 34 deletions
diff --git a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
index 463888551a..15cd62d3bf 100644
--- a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
+++ b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
@@ -23,6 +23,7 @@ import java.util.{Locale, TimeZone}
import org.scalatest.BeforeAndAfter
import org.apache.spark.sql.SQLConf
+import org.apache.spark.sql.hive.HiveShim
import org.apache.spark.sql.hive.test.TestHive
/**
@@ -102,6 +103,8 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"udf5",
"udf_java_method",
"create_merge_compressed",
+ "database_location",
+ "database_properties",
// DFS commands
"symlink_text_input_format",
@@ -135,6 +138,9 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"stats20",
"alter_merge_stats",
"columnstats.*",
+ "annotate_stats.*",
+ "database_drop",
+ "index_serde",
// Hive seems to think 1.0 > NaN = true && 1.0 < NaN = false... which is wrong.
@@ -211,8 +217,20 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"describe_comment_indent",
// Limit clause without a ordering, which causes failure.
- "orc_predicate_pushdown"
- )
+ "orc_predicate_pushdown",
+
+ // Requires precision decimal support:
+ "decimal_1",
+ "udf_pmod",
+ "udf_when",
+ "udf_case",
+ "udf_to_double",
+ "udf_to_float",
+
+ // Needs constant object inspectors
+ "udf_round",
+ "udf7"
+ ) ++ HiveShim.compatibilityBlackList
/**
* The set of tests that are believed to be working in catalyst. Tests not on whiteList or
@@ -220,23 +238,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
*/
override def whiteList = Seq(
"add_part_exist",
- "dynamic_partition_skip_default",
- "infer_bucket_sort_dyn_part",
- "load_dyn_part1",
- "load_dyn_part2",
- "load_dyn_part3",
- "load_dyn_part4",
- "load_dyn_part5",
- "load_dyn_part6",
- "load_dyn_part7",
- "load_dyn_part8",
- "load_dyn_part9",
- "load_dyn_part10",
- "load_dyn_part11",
- "load_dyn_part12",
- "load_dyn_part13",
- "load_dyn_part14",
- "load_dyn_part14_win",
"add_part_multiple",
"add_partition_no_whitelist",
"add_partition_with_whitelist",
@@ -256,6 +257,11 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"alter_varchar2",
"alter_view_as_select",
"ambiguous_col",
+ "annotate_stats_join",
+ "annotate_stats_limit",
+ "annotate_stats_part",
+ "annotate_stats_table",
+ "annotate_stats_union",
"auto_join0",
"auto_join1",
"auto_join10",
@@ -299,6 +305,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"auto_sortmerge_join_13",
"auto_sortmerge_join_14",
"auto_sortmerge_join_15",
+ "auto_sortmerge_join_16",
"auto_sortmerge_join_2",
"auto_sortmerge_join_3",
"auto_sortmerge_join_4",
@@ -340,7 +347,10 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"create_skewed_table1",
"create_struct_table",
"cross_join",
+ "cross_product_check_1",
+ "cross_product_check_2",
"ct_case_insensitive",
+ "database_drop",
"database_location",
"database_properties",
"date_2",
@@ -360,8 +370,11 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"diff_part_input_formats",
"disable_file_format_check",
"disallow_incompatible_type_change_off",
+ "distinct_stats",
+ "drop_database_removes_partition_dirs",
"drop_function",
"drop_index",
+ "drop_index_removes_partition_dirs",
"drop_multi_partitions",
"drop_partitions_filter",
"drop_partitions_filter2",
@@ -369,23 +382,30 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"drop_partitions_ignore_protection",
"drop_table",
"drop_table2",
+ "drop_table_removes_partition_dirs",
"drop_view",
+ "dynamic_partition_skip_default",
"escape_clusterby1",
"escape_distributeby1",
"escape_orderby1",
"escape_sortby1",
+ "explain_rearrange",
"fetch_aggregation",
+ "fileformat_mix",
"fileformat_sequencefile",
"fileformat_text",
"filter_join_breaktask",
"filter_join_breaktask2",
"groupby1",
"groupby11",
+ "groupby12",
+ "groupby1_limit",
"groupby1_map",
"groupby1_map_nomap",
"groupby1_map_skew",
"groupby1_noskew",
"groupby2",
+ "groupby2_limit",
"groupby2_map",
"groupby2_map_skew",
"groupby2_noskew",
@@ -406,6 +426,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"groupby7_map_multi_single_reducer",
"groupby7_map_skew",
"groupby7_noskew",
+ "groupby7_noskew_multi_single_reducer",
"groupby8",
"groupby8_map",
"groupby8_map_skew",
@@ -432,6 +453,8 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"groupby_sort_test_1",
"having",
"implicit_cast1",
+ "index_serde",
+ "infer_bucket_sort_dyn_part",
"innerjoin",
"inoutdriver",
"input",
@@ -502,7 +525,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"join17",
"join18",
"join19",
- "join_1to1",
"join2",
"join20",
"join21",
@@ -534,6 +556,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"join7",
"join8",
"join9",
+ "join_1to1",
"join_array",
"join_casesensitive",
"join_empty",
@@ -557,7 +580,21 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"literal_double",
"literal_ints",
"literal_string",
+ "load_dyn_part1",
+ "load_dyn_part10",
+ "load_dyn_part11",
+ "load_dyn_part12",
+ "load_dyn_part13",
+ "load_dyn_part14",
+ "load_dyn_part14_win",
+ "load_dyn_part2",
+ "load_dyn_part3",
+ "load_dyn_part4",
+ "load_dyn_part5",
+ "load_dyn_part6",
"load_dyn_part7",
+ "load_dyn_part8",
+ "load_dyn_part9",
"load_file_with_space_in_the_name",
"loadpart1",
"louter_join_ppr",
@@ -578,13 +615,13 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"merge1",
"merge2",
"mergejoins",
- "multigroupby_singlemr",
+ "multiMapJoin1",
+ "multiMapJoin2",
"multi_insert_gby",
"multi_insert_gby3",
"multi_insert_lateral_view",
"multi_join_union",
- "multiMapJoin1",
- "multiMapJoin2",
+ "multigroupby_singlemr",
"noalias_subq1",
"nomore_ambiguous_table_col",
"nonblock_op_deduplicate",
@@ -607,10 +644,10 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"outer_join_ppr",
"parallel",
"parenthesis_star_by",
- "partcols1",
"part_inherit_tbl_props",
"part_inherit_tbl_props_empty",
"part_inherit_tbl_props_with_star",
+ "partcols1",
"partition_date",
"partition_schema1",
"partition_serde_format",
@@ -641,7 +678,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"ppd_outer_join5",
"ppd_random",
"ppd_repeated_alias",
- "ppd_transform",
"ppd_udf_col",
"ppd_union",
"ppr_allchildsarenull",
@@ -674,15 +710,15 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"serde_regex",
"serde_reported_schema",
"set_variable_sub",
- "show_create_table_partitioned",
- "show_create_table_delimited",
+ "show_columns",
"show_create_table_alter",
- "show_create_table_view",
- "show_create_table_serde",
"show_create_table_db_table",
+ "show_create_table_delimited",
"show_create_table_does_not_exist",
"show_create_table_index",
- "show_columns",
+ "show_create_table_partitioned",
+ "show_create_table_serde",
+ "show_create_table_view",
"show_describe_func_quotes",
"show_functions",
"show_partitions",
@@ -738,12 +774,14 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"udaf_covar_pop",
"udaf_covar_samp",
"udaf_histogram_numeric",
- "udf_10_trims",
"udf2",
"udf6",
"udf7",
"udf8",
"udf9",
+ "udf_10_trims",
+ "udf_E",
+ "udf_PI",
"udf_abs",
"udf_acos",
"udf_add",
@@ -774,14 +812,13 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"udf_cos",
"udf_count",
"udf_date_add",
- "udf_datediff",
"udf_date_sub",
+ "udf_datediff",
"udf_day",
"udf_dayofmonth",
"udf_degrees",
"udf_div",
"udf_double",
- "udf_E",
"udf_elt",
"udf_equal",
"udf_exp",
@@ -826,7 +863,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"udf_nvl",
"udf_or",
"udf_parse_url",
- "udf_PI",
"udf_pmod",
"udf_positive",
"udf_pow",