Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2328#discussion_r196132442
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
 ---
    @@ -145,6 +149,41 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser 
{
             CarbonAlterTableFinishStreaming(dbName, table)
         }
     
    +  /**
    +   * The syntax of CREATE STREAM
    +   * CREATE STREAM streamName ON TABLE [dbName.]tableName
    +   * [STMPROPERTIES('KEY'='VALUE')]
    +   * AS SELECT COUNT(COL1) FROM tableName
    +   */
    +  protected lazy val createStream: Parser[LogicalPlan] =
    +    (CREATE ~> STREAM ~> ident) ~ (ON ~> TABLE ~> (ident <~ ".").?) ~ 
ident ~
    +    (STMPROPERTIES ~> "(" ~> repsep(loadOptions, ",") <~ ")").? ~
    +    (AS ~> restInput) <~ opt(";") ^^ {
    +      case streamName ~ dbName ~ tableName ~ options ~ query =>
    +        val optionMap = options.getOrElse(List[(String, 
String)]()).toMap[String, String]
    +        CarbonCreateStreamCommand(streamName, dbName, tableName, 
optionMap, query)
    +    }
    +
    +  /**
    +   * The syntax of DROP STREAM
    +   * DROP STREAM streamName
    +   */
    +  protected lazy val dropStream: Parser[LogicalPlan] =
    +    DROP ~> STREAM ~> ident <~ opt(";") ^^ {
    --- End diff --
    
    fixed


---

Reply via email to