Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2374#discussion_r196627999
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
---
@@ -403,6 +403,17 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser
{
partition = partitionSpec)
}
+ /**
+ * The syntax of
+ * ALTER TABLE [dbName.]tableName ADD SEGMENT LOCATION 'path/to/data'
+ */
+ protected lazy val addSegment: Parser[LogicalPlan] =
+ ALTER ~> TABLE ~> (ident <~ ".").? ~ ident ~
+ ADD ~ SEGMENT ~ LOCATION ~ stringLit <~ opt(";") ^^ {
+ case dbName ~ tableName ~ add ~ segment ~ location ~ filePath =>
--- End diff --
OK
---