aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst/src
diff options
context:
space:
mode:
authorjiangxingbo <jiangxb1987@gmail.com>2017-01-24 12:37:30 +0800
committerWenchen Fan <wenchen@databricks.com>2017-01-24 12:37:30 +0800
commit3bdf3ee860dad2eb75f5046ecf672cc15a8e7fb8 (patch)
tree16eaf330f5c09893f45fb2847b8e29812233e745 /sql/catalyst/src
parentfcfd5d0bbaf2fb2437d0eb12e3eba1b52153997c (diff)
downloadspark-3bdf3ee860dad2eb75f5046ecf672cc15a8e7fb8.tar.gz
spark-3bdf3ee860dad2eb75f5046ecf672cc15a8e7fb8.tar.bz2
spark-3bdf3ee860dad2eb75f5046ecf672cc15a8e7fb8.zip
[SPARK-19272][SQL] Remove the param `viewOriginalText` from `CatalogTable`
## What changes were proposed in this pull request? Hive will expand the view text, so it needs 2 fields: originalText and viewText. Since we don't expand the view text, but only add table properties, perhaps only a single field `viewText` is enough in CatalogTable. This PR brought in the following changes: 1. Remove the param `viewOriginalText` from `CatalogTable`; 2. Update the output of command `DescribeTableCommand`. ## How was this patch tested? Tested by exsiting test cases, also updated the failed test cases. Author: jiangxingbo <jiangxb1987@gmail.com> Closes #16679 from jiangxb1987/catalogTable.
Diffstat (limited to 'sql/catalyst/src')
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala2
-rw-r--r--sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala1
2 files changed, 0 insertions, 3 deletions
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 80d32822f5..7bbaf6eb94 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
@@ -175,7 +175,6 @@ case class CatalogTable(
lastAccessTime: Long = -1,
properties: Map[String, String] = Map.empty,
stats: Option[CatalogStatistics] = None,
- viewOriginalText: Option[String] = None,
viewText: Option[String] = None,
comment: Option[String] = None,
unsupportedFeatures: Seq[String] = Seq.empty,
@@ -261,7 +260,6 @@ case class CatalogTable(
if (provider.isDefined) s"Provider: ${provider.get}" else "",
if (partitionColumnNames.nonEmpty) s"Partition Columns: $partitionColumns" else ""
) ++ bucketStrings ++ Seq(
- viewOriginalText.map("Original View: " + _).getOrElse(""),
viewText.map("View: " + _).getOrElse(""),
comment.map("Comment: " + _).getOrElse(""),
if (properties.nonEmpty) s"Properties: $tableProperties" else "",
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala
index ae65109b4d..a5d399a065 100644
--- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala
+++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala
@@ -919,7 +919,6 @@ abstract class CatalogTestUtils {
.add("col2", "string")
.add("a", "int")
.add("b", "string"),
- viewOriginalText = Some("SELECT * FROM tbl1"),
viewText = Some("SELECT * FROM tbl1"),
properties = Map(CatalogTable.VIEW_DEFAULT_DATABASE -> viewDefaultDatabase))
}