spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewor14 <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-13139][SQL][WIP] Parse Hive DDL command...
Date Wed, 09 Mar 2016 22:42:58 GMT
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11573#discussion_r55603942
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala ---
    @@ -64,6 +85,53 @@ private[sql] class SparkQl(conf: ParserConf = SimpleParserConf()) extends
Cataly
             val tableIdent = extractTableIdent(nameParts)
             RefreshTable(tableIdent)
     
    +      case Token("TOK_CREATEDATABASE", Token(databaseName, Nil) :: createDatabaseArgs)
=>
    +        val Seq(
    +          allowExisting,
    +          dbLocation,
    +          databaseComment,
    +          dbprops) = getClauses(Seq(
    +          "TOK_IFNOTEXISTS",
    +          "TOK_DATABASELOCATION",
    +          "TOK_DATABASECOMMENT",
    +          "TOK_DATABASEPROPERTIES"), createDatabaseArgs)
    +        val location = dbLocation.map {
    +          case Token("TOK_DATABASELOCATION", Token(loc, Nil) :: Nil) => unquoteString(loc)
    +        }
    +        val comment = databaseComment.map {
    +          case Token("TOK_DATABASECOMMENT", Token(comment, Nil) :: Nil) => unquoteString(comment)
    +        }
    +        val props: Map[String, String] = dbprops.toSeq.flatMap {
    +          case Token("TOK_DATABASEPROPERTIES", propList) =>
    +            propList.flatMap(extractProps(_, "TOK_DBPROPLIST", "TOK_TABLEPROPERTY"))
    +        }.toMap
    +        CreateDatabase(databaseName, allowExisting.isDefined, location, comment, props)(node.source)
    +
    +      case Token("TOK_CREATEFUNCTION", func :: as :: createFuncArgs) =>
    --- End diff --
    
    fixed in latest commit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message