You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by yh...@apache.org on 2016/09/06 04:13:43 UTC
spark git commit: Revert "[SPARK-17369][SQL] MetastoreRelation toJSON
throws AssertException due to missing otherCopyArgs"
Repository: spark
Updated Branches:
refs/heads/branch-2.0 dd27530c7 -> f56b70fec
Revert "[SPARK-17369][SQL] MetastoreRelation toJSON throws AssertException due to missing otherCopyArgs"
This reverts commit 7b1aa2153bc6c8b753dba0710fe7b5d031158a34.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f56b70fe
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f56b70fe
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f56b70fe
Branch: refs/heads/branch-2.0
Commit: f56b70fec2d31fd062320bb328c320e4eca72f1d
Parents: dd27530
Author: Yin Huai <yh...@databricks.com>
Authored: Mon Sep 5 21:13:28 2016 -0700
Committer: Yin Huai <yh...@databricks.com>
Committed: Mon Sep 5 21:13:28 2016 -0700
----------------------------------------------------------------------
.../spark/sql/hive/MetastoreRelation.scala | 2 +-
.../spark/sql/hive/MetastoreRelationSuite.scala | 39 --------------------
2 files changed, 1 insertion(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/f56b70fe/sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala
----------------------------------------------------------------------
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala
index 10d71be..88d8d4b 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala
@@ -61,7 +61,7 @@ private[hive] case class MetastoreRelation(
Objects.hashCode(databaseName, tableName, alias, output)
}
- override protected def otherCopyArgs: Seq[AnyRef] = catalogTable :: client :: sparkSession :: Nil
+ override protected def otherCopyArgs: Seq[AnyRef] = catalogTable :: sparkSession :: Nil
private def toHiveColumn(c: CatalogColumn): FieldSchema = {
new FieldSchema(c.name, c.dataType, c.comment.orNull)
http://git-wip-us.apache.org/repos/asf/spark/blob/f56b70fe/sql/hive/src/test/scala/org/apache/spark/sql/hive/MetastoreRelationSuite.scala
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/MetastoreRelationSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/MetastoreRelationSuite.scala
deleted file mode 100644
index 2f3055d..0000000
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/MetastoreRelationSuite.scala
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-* 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 org.apache.spark.SparkFunSuite
-import org.apache.spark.sql.catalyst.TableIdentifier
-import org.apache.spark.sql.catalyst.catalog.{CatalogStorageFormat, CatalogTable, CatalogTableType}
-import org.apache.spark.sql.types.{IntegerType, StructField, StructType}
-
-class MetastoreRelationSuite extends SparkFunSuite {
- test("makeCopy and toJSON should work") {
- val table = CatalogTable(
- identifier = TableIdentifier("test", Some("db")),
- tableType = CatalogTableType.VIEW,
- storage = CatalogStorageFormat.empty,
- schema = StructType(StructField("a", IntegerType, true) :: Nil))
- val relation = MetastoreRelation("db", "test")(table, null, null)
-
- // No exception should be thrown
- relation.makeCopy(Array("db", "test"))
- // No exception should be thrown
- relation.toJSON
- }
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org