spark git commit: [SPARK-9758] [TEST] [SQL] Compilation issue for hive test / wrong package?
Repository: spark Updated Branches: refs/heads/master a2f4cdceb - cb2d2e158 [SPARK-9758] [TEST] [SQL] Compilation issue for hive test / wrong package? Move `test.org.apache.spark.sql.hive` package tests to apparent intended `org.apache.spark.sql.hive` as they don't intend to test behavior from outside org.apache.spark.* Alternate take, per discussion at https://github.com/apache/spark/pull/8051 I think this is what vanzin and I had in mind but also CC rxin to cross-check, as this does indeed depend on whether these tests were accidentally in this package or not. Testing from a `test.org.apache.spark` package is legitimate but didn't seem to be the intent here. Author: Sean Owen so...@cloudera.com Closes #8307 from srowen/SPARK-9758. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/cb2d2e15 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/cb2d2e15 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/cb2d2e15 Branch: refs/heads/master Commit: cb2d2e15844d7ae34b5dd7028b55e11586ed93fa Parents: a2f4cdc Author: Sean Owen so...@cloudera.com Authored: Mon Aug 24 22:35:21 2015 +0100 Committer: Sean Owen so...@cloudera.com Committed: Mon Aug 24 22:35:21 2015 +0100 -- .../spark/sql/hive/JavaDataFrameSuite.java | 104 .../sql/hive/JavaMetastoreDataSourcesSuite.java | 162 ++ .../spark/sql/hive/aggregate/MyDoubleAvg.java | 129 +++ .../spark/sql/hive/aggregate/MyDoubleSum.java | 118 ++ .../sql/hive/execution/UDFIntegerToString.java | 26 +++ .../sql/hive/execution/UDFListListInt.java | 47 ++ .../spark/sql/hive/execution/UDFListString.java | 38 + .../sql/hive/execution/UDFStringString.java | 26 +++ .../sql/hive/execution/UDFTwoListList.java | 28 .../spark/sql/hive/JavaDataFrameSuite.java | 106 .../sql/hive/JavaMetastoreDataSourcesSuite.java | 163 --- .../spark/sql/hive/aggregate/MyDoubleAvg.java | 129 --- .../spark/sql/hive/aggregate/MyDoubleSum.java | 118 -- .../sql/hive/execution/UDFIntegerToString.java | 26 --- .../sql/hive/execution/UDFListListInt.java | 47 -- .../spark/sql/hive/execution/UDFListString.java | 38 - .../sql/hive/execution/UDFStringString.java | 26 --- .../sql/hive/execution/UDFTwoListList.java | 28 .../hive/execution/AggregationQuerySuite.scala | 2 +- 19 files changed, 679 insertions(+), 682 deletions(-) -- http://git-wip-us.apache.org/repos/asf/spark/blob/cb2d2e15/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java -- diff --git a/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java b/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java new file mode 100644 index 000..019d8a3 --- /dev/null +++ b/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java @@ -0,0 +1,104 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.hive; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import org.apache.spark.api.java.JavaSparkContext; +import org.apache.spark.sql.*; +import org.apache.spark.sql.expressions.Window; +import org.apache.spark.sql.expressions.UserDefinedAggregateFunction; +import static org.apache.spark.sql.functions.*; +import org.apache.spark.sql.hive.test.TestHive$; +import org.apache.spark.sql.hive.aggregate.MyDoubleSum; + +public class JavaDataFrameSuite { + private transient JavaSparkContext sc; + private transient HiveContext hc; + + DataFrame df; + + private void checkAnswer(DataFrame actual, ListRow expected) { +String errorMessage = QueryTest$.MODULE$.checkAnswer(actual, expected); +if (errorMessage != null) { + Assert.fail(errorMessage); +} + } + + @Before + public
spark git commit: [SPARK-9758] [TEST] [SQL] Compilation issue for hive test / wrong package?
Repository: spark Updated Branches: refs/heads/branch-1.5 d36f3517c - 92234439d [SPARK-9758] [TEST] [SQL] Compilation issue for hive test / wrong package? Move `test.org.apache.spark.sql.hive` package tests to apparent intended `org.apache.spark.sql.hive` as they don't intend to test behavior from outside org.apache.spark.* Alternate take, per discussion at https://github.com/apache/spark/pull/8051 I think this is what vanzin and I had in mind but also CC rxin to cross-check, as this does indeed depend on whether these tests were accidentally in this package or not. Testing from a `test.org.apache.spark` package is legitimate but didn't seem to be the intent here. Author: Sean Owen so...@cloudera.com Closes #8307 from srowen/SPARK-9758. (cherry picked from commit cb2d2e15844d7ae34b5dd7028b55e11586ed93fa) Signed-off-by: Sean Owen so...@cloudera.com Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/92234439 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/92234439 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/92234439 Branch: refs/heads/branch-1.5 Commit: 92234439d86044a3ec9f198c3b13ec20c763393d Parents: d36f351 Author: Sean Owen so...@cloudera.com Authored: Mon Aug 24 22:35:21 2015 +0100 Committer: Sean Owen so...@cloudera.com Committed: Mon Aug 24 22:35:31 2015 +0100 -- .../spark/sql/hive/JavaDataFrameSuite.java | 104 .../sql/hive/JavaMetastoreDataSourcesSuite.java | 162 ++ .../spark/sql/hive/aggregate/MyDoubleAvg.java | 129 +++ .../spark/sql/hive/aggregate/MyDoubleSum.java | 118 ++ .../sql/hive/execution/UDFIntegerToString.java | 26 +++ .../sql/hive/execution/UDFListListInt.java | 47 ++ .../spark/sql/hive/execution/UDFListString.java | 38 + .../sql/hive/execution/UDFStringString.java | 26 +++ .../sql/hive/execution/UDFTwoListList.java | 28 .../spark/sql/hive/JavaDataFrameSuite.java | 106 .../sql/hive/JavaMetastoreDataSourcesSuite.java | 163 --- .../spark/sql/hive/aggregate/MyDoubleAvg.java | 129 --- .../spark/sql/hive/aggregate/MyDoubleSum.java | 118 -- .../sql/hive/execution/UDFIntegerToString.java | 26 --- .../sql/hive/execution/UDFListListInt.java | 47 -- .../spark/sql/hive/execution/UDFListString.java | 38 - .../sql/hive/execution/UDFStringString.java | 26 --- .../sql/hive/execution/UDFTwoListList.java | 28 .../hive/execution/AggregationQuerySuite.scala | 2 +- 19 files changed, 679 insertions(+), 682 deletions(-) -- http://git-wip-us.apache.org/repos/asf/spark/blob/92234439/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java -- diff --git a/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java b/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java new file mode 100644 index 000..019d8a3 --- /dev/null +++ b/sql/hive/src/test/java/org/apache/spark/sql/hive/JavaDataFrameSuite.java @@ -0,0 +1,104 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.hive; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import org.apache.spark.api.java.JavaSparkContext; +import org.apache.spark.sql.*; +import org.apache.spark.sql.expressions.Window; +import org.apache.spark.sql.expressions.UserDefinedAggregateFunction; +import static org.apache.spark.sql.functions.*; +import org.apache.spark.sql.hive.test.TestHive$; +import org.apache.spark.sql.hive.aggregate.MyDoubleSum; + +public class JavaDataFrameSuite { + private transient JavaSparkContext sc; + private transient HiveContext hc; + + DataFrame df; + + private void checkAnswer(DataFrame actual, ListRow expected) { +String errorMessage =