Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14518] [SQL] Support Comment in CREATE VIEW - #12288
Conversation
SparkQA
commented
Apr 10, 2016
Test build #55481 has finished for PR 12288 at commit
|
gatorsmile
commented
Apr 10, 2016
cc @yhuai@andrewor14 Thanks! |
| private def createView( | ||
| ctx: ParserRuleContext, | ||
| name: TableIdentifierContext, | ||
| description: Option[String], |
There was a problem hiding this comment.
Should we just call it comment? Or, are we using description in other places?
There was a problem hiding this comment.
CatalogDatabase uses description as comment. Maybe comment is more straightforward. Let me change it. Thanks!
yhuai
commented
Apr 10, 2016
@gatorsmile Thank you for working on it. How about we hold off the change until we merge https://github.com/apache/spark/pull/12271/files? That PR is adding the field for comment in the CatalogTable. |
gatorsmile
commented
Apr 10, 2016
Sure, no problem. : ) |
SparkQA
commented
Apr 10, 2016
Test build #55485 has finished for PR 12288 at commit
|
# Conflicts: # sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveSqlParser.scala
SparkQA
commented
Apr 14, 2016
Test build #55785 has finished for PR 12288 at commit
|
gatorsmile
commented
Apr 14, 2016
@yhuai@andrewor14@cloud-fan@liancheng After the merge of |
| sql(s"CREATE VIEW $viewName COMMENT 'no comment' AS SELECT * FROM $tabName") | ||
| val tableMetadata = catalog.getTableMetadata(TableIdentifier(tabName, Some("default"))) | ||
| val viewMetadata = catalog.getTableMetadata(TableIdentifier(viewName, Some("default"))) | ||
| assert(tableMetadata.properties.filter(_._1 != "transient_lastDdlTime") |
There was a problem hiding this comment.
I'd like to do assert(tableMetadata.properties.get("comment") == "BLABLA")
cloud-fan
commented
Apr 14, 2016
LGTM except one minor comment |
SparkQA
commented
Apr 14, 2016
Test build #55816 has finished for PR 12288 at commit
|
yhuai
commented
Apr 14, 2016
Thanks. Merging to master. |
What changes were proposed in this pull request?
HQL Syntax: Create View
Add a support for the
[COMMENT view_comment]clauseHow was this patch tested?
Modified the existing test cases to verify the correctness.