spark git commit: [SPARK-18244][SQL] Rename partitionProviderIsHive -> tracksPartitionsInCatalog
Repository: spark Updated Branches: refs/heads/branch-2.1 c2876bfbf -> 4f91630c8 [SPARK-18244][SQL] Rename partitionProviderIsHive -> tracksPartitionsInCatalog ## What changes were proposed in this pull request? This patch renames partitionProviderIsHive to tracksPartitionsInCatalog, as the old name was too Hive specific. ## How was this patch tested? Should be covered by existing tests. Author: Reynold XinCloses #15750 from rxin/SPARK-18244. (cherry picked from commit b17057c0a69b9c56e503483d97f5dc209eef0884) Signed-off-by: Reynold Xin Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4f91630c Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4f91630c Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4f91630c Branch: refs/heads/branch-2.1 Commit: 4f91630c8100ee3a6fd168bc4247ca6fadd0a736 Parents: c2876bf Author: Reynold Xin Authored: Thu Nov 3 11:48:05 2016 -0700 Committer: Reynold Xin Committed: Thu Nov 3 11:48:17 2016 -0700 -- .../spark/sql/catalyst/catalog/interface.scala | 9 + .../sql/catalyst/trees/TreeNodeSuite.scala | 2 +- .../command/createDataSourceTables.scala| 2 +- .../spark/sql/execution/command/ddl.scala | 4 ++-- .../spark/sql/execution/command/tables.scala| 2 +- .../sql/execution/datasources/DataSource.scala | 2 +- .../datasources/DataSourceStrategy.scala| 7 --- .../InsertIntoHadoopFsRelationCommand.scala | 6 +- .../spark/sql/execution/command/DDLSuite.scala | 2 +- .../spark/sql/hive/HiveExternalCatalog.scala| 21 10 files changed, 30 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/spark/blob/4f91630c/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala -- diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala index 7c3bec8..34748a0 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala @@ -138,8 +138,9 @@ case class BucketSpec( * Can be None if this table is a View, should be "hive" for hive serde tables. * @param unsupportedFeatures is a list of string descriptions of features that are used by the *underlying table but not supported by Spark SQL yet. - * @param partitionProviderIsHive whether this table's partition metadata is stored in the Hive - *metastore. + * @param tracksPartitionsInCatalog whether this table's partition metadata is stored in the + * catalog. If false, it is inferred automatically based on file + * structure. */ case class CatalogTable( identifier: TableIdentifier, @@ -158,7 +159,7 @@ case class CatalogTable( viewText: Option[String] = None, comment: Option[String] = None, unsupportedFeatures: Seq[String] = Seq.empty, -partitionProviderIsHive: Boolean = false) { +tracksPartitionsInCatalog: Boolean = false) { /** schema of this table's partition columns */ def partitionSchema: StructType = StructType(schema.filter { @@ -217,7 +218,7 @@ case class CatalogTable( if (properties.nonEmpty) s"Properties: $tableProperties" else "", if (stats.isDefined) s"Statistics: ${stats.get.simpleString}" else "", s"$storage", -if (partitionProviderIsHive) "Partition Provider: Hive" else "") +if (tracksPartitionsInCatalog) "Partition Provider: Catalog" else "") output.filter(_.nonEmpty).mkString("CatalogTable(\n\t", "\n\t", ")") } http://git-wip-us.apache.org/repos/asf/spark/blob/4f91630c/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala -- diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala index 3eff12f..af1eaa1 100644 --- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala +++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala @@ -489,7 +489,7 @@ class TreeNodeSuite extends SparkFunSuite { "owner" -> "", "createTime" -> 0, "lastAccessTime" -> -1, -"partitionProviderIsHive" -> false, +"tracksPartitionsInCatalog" -> false,
spark git commit: [SPARK-18244][SQL] Rename partitionProviderIsHive -> tracksPartitionsInCatalog
Repository: spark Updated Branches: refs/heads/master 27daf6bcd -> b17057c0a [SPARK-18244][SQL] Rename partitionProviderIsHive -> tracksPartitionsInCatalog ## What changes were proposed in this pull request? This patch renames partitionProviderIsHive to tracksPartitionsInCatalog, as the old name was too Hive specific. ## How was this patch tested? Should be covered by existing tests. Author: Reynold XinCloses #15750 from rxin/SPARK-18244. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/b17057c0 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/b17057c0 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/b17057c0 Branch: refs/heads/master Commit: b17057c0a69b9c56e503483d97f5dc209eef0884 Parents: 27daf6b Author: Reynold Xin Authored: Thu Nov 3 11:48:05 2016 -0700 Committer: Reynold Xin Committed: Thu Nov 3 11:48:05 2016 -0700 -- .../spark/sql/catalyst/catalog/interface.scala | 9 + .../sql/catalyst/trees/TreeNodeSuite.scala | 2 +- .../command/createDataSourceTables.scala| 2 +- .../spark/sql/execution/command/ddl.scala | 4 ++-- .../spark/sql/execution/command/tables.scala| 2 +- .../sql/execution/datasources/DataSource.scala | 2 +- .../datasources/DataSourceStrategy.scala| 7 --- .../InsertIntoHadoopFsRelationCommand.scala | 6 +- .../spark/sql/execution/command/DDLSuite.scala | 2 +- .../spark/sql/hive/HiveExternalCatalog.scala| 21 10 files changed, 30 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/spark/blob/b17057c0/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala -- diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala index 7c3bec8..34748a0 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala @@ -138,8 +138,9 @@ case class BucketSpec( * Can be None if this table is a View, should be "hive" for hive serde tables. * @param unsupportedFeatures is a list of string descriptions of features that are used by the *underlying table but not supported by Spark SQL yet. - * @param partitionProviderIsHive whether this table's partition metadata is stored in the Hive - *metastore. + * @param tracksPartitionsInCatalog whether this table's partition metadata is stored in the + * catalog. If false, it is inferred automatically based on file + * structure. */ case class CatalogTable( identifier: TableIdentifier, @@ -158,7 +159,7 @@ case class CatalogTable( viewText: Option[String] = None, comment: Option[String] = None, unsupportedFeatures: Seq[String] = Seq.empty, -partitionProviderIsHive: Boolean = false) { +tracksPartitionsInCatalog: Boolean = false) { /** schema of this table's partition columns */ def partitionSchema: StructType = StructType(schema.filter { @@ -217,7 +218,7 @@ case class CatalogTable( if (properties.nonEmpty) s"Properties: $tableProperties" else "", if (stats.isDefined) s"Statistics: ${stats.get.simpleString}" else "", s"$storage", -if (partitionProviderIsHive) "Partition Provider: Hive" else "") +if (tracksPartitionsInCatalog) "Partition Provider: Catalog" else "") output.filter(_.nonEmpty).mkString("CatalogTable(\n\t", "\n\t", ")") } http://git-wip-us.apache.org/repos/asf/spark/blob/b17057c0/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala -- diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala index 3eff12f..af1eaa1 100644 --- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala +++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala @@ -489,7 +489,7 @@ class TreeNodeSuite extends SparkFunSuite { "owner" -> "", "createTime" -> 0, "lastAccessTime" -> -1, -"partitionProviderIsHive" -> false, +"tracksPartitionsInCatalog" -> false, "properties" -> JNull, "unsupportedFeatures" -> List.empty[String]))