jackylk opened a new pull request #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612 ### Why is this PR needed? ### What changes were proposed in this PR? This PR adds implementation of Materialized View related command, which is independent of DataMap command ### Does this PR introduce any user interface change? - No - Yes. (please explain the change and update document) ### Is any new testcase added? - No - Yes ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
CarbonDataQA1 commented on issue #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-584745990 Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1945/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-584747813 Build Failed with Spark 2.4.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.4/243/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585009647 Build Failed with Spark 2.4.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.4/246/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585013951 Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1948/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
niuge01 commented on a change in pull request #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#discussion_r378021902 ########## File path: datamap/mv/core/src/main/scala/org/apache/carbondata/mv/extension/MVParser.scala ########## @@ -0,0 +1,204 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.mv.extension + +import scala.language.implicitConversions +import scala.util.matching.Regex +import scala.util.parsing.combinator.PackratParsers +import scala.util.parsing.combinator.syntactical.StandardTokenParsers + +import org.apache.spark.sql.{DataFrame, SparkSession} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.catalyst.{SqlLexical, TableIdentifier} +import org.apache.spark.sql.hive.CarbonMVRules +import org.apache.spark.sql.util.{CarbonException, SparkSQLUtil} + +import org.apache.carbondata.common.exceptions.sql.MalformedCarbonCommandException +import org.apache.carbondata.mv.extension.command.{CreateMaterializedViewCommand, DropMaterializedViewCommand, RebuildMaterializedViewCommand, ShowMaterializedViewCommand} +import org.apache.carbondata.mv.rewrite.MVUdf + +class MVParser extends StandardTokenParsers with PackratParsers { + + // Keywords used in this parser + protected val SELECT: Regex = carbonKeyWord("SELECT") + protected val CREATE: Regex = carbonKeyWord("CREATE") + protected val MATERIALIZED: Regex = carbonKeyWord("MATERIALIZED") + protected val VIEW: Regex = carbonKeyWord("VIEW") + protected val VIEWS: Regex = carbonKeyWord("VIEWS") + protected val AS: Regex = carbonKeyWord("AS") + protected val DROP: Regex = carbonKeyWord("DROP") + protected val SHOW: Regex = carbonKeyWord("SHOW") + protected val IF: Regex = carbonKeyWord("IF") + protected val EXISTS: Regex = carbonKeyWord("EXISTS") + protected val NOT: Regex = carbonKeyWord("NOT") + protected val MVPROPERTIES: Regex = carbonKeyWord("MVPROPERTIES") Review comment: ```suggestion protected val MVPROPERTIES: Regex = carbonKeyWord("PROPERTIES") ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
niuge01 commented on a change in pull request #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#discussion_r378030512 ########## File path: datamap/mv/core/src/main/scala/org/apache/carbondata/mv/extension/MVParser.scala ########## @@ -0,0 +1,204 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.mv.extension + +import scala.language.implicitConversions +import scala.util.matching.Regex +import scala.util.parsing.combinator.PackratParsers +import scala.util.parsing.combinator.syntactical.StandardTokenParsers + +import org.apache.spark.sql.{DataFrame, SparkSession} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.catalyst.{SqlLexical, TableIdentifier} +import org.apache.spark.sql.hive.CarbonMVRules +import org.apache.spark.sql.util.{CarbonException, SparkSQLUtil} + +import org.apache.carbondata.common.exceptions.sql.MalformedCarbonCommandException +import org.apache.carbondata.mv.extension.command.{CreateMaterializedViewCommand, DropMaterializedViewCommand, RebuildMaterializedViewCommand, ShowMaterializedViewCommand} +import org.apache.carbondata.mv.rewrite.MVUdf + +class MVParser extends StandardTokenParsers with PackratParsers { + + // Keywords used in this parser + protected val SELECT: Regex = carbonKeyWord("SELECT") + protected val CREATE: Regex = carbonKeyWord("CREATE") + protected val MATERIALIZED: Regex = carbonKeyWord("MATERIALIZED") + protected val VIEW: Regex = carbonKeyWord("VIEW") + protected val VIEWS: Regex = carbonKeyWord("VIEWS") + protected val AS: Regex = carbonKeyWord("AS") + protected val DROP: Regex = carbonKeyWord("DROP") + protected val SHOW: Regex = carbonKeyWord("SHOW") + protected val IF: Regex = carbonKeyWord("IF") + protected val EXISTS: Regex = carbonKeyWord("EXISTS") + protected val NOT: Regex = carbonKeyWord("NOT") + protected val MVPROPERTIES: Regex = carbonKeyWord("MVPROPERTIES") + protected val WITH: Regex = carbonKeyWord("WITH") + protected val DEFERRED: Regex = carbonKeyWord("DEFERRED") + protected val REBUILD: Regex = carbonKeyWord("REBUILD") + protected val ON: Regex = carbonKeyWord("ON") + protected val TABLE: Regex = carbonKeyWord("TABLE") + + /** + * This will convert key word to regular expression. + */ + private def carbonKeyWord(keys: String): Regex = { + ("(?i)" + keys).r + } + + implicit def regexToParser(regex: Regex): Parser[String] = { + import lexical.Identifier + acceptMatch( + s"identifier matching regex ${ regex }", + { case Identifier(str) if regex.unapplySeq(str).isDefined => str } + ) + } + + // By default, use Reflection to find the reserved words defined in the sub class. + // NOTICE, Since the Keyword properties defined by sub class, we couldn't call this + // method during the parent class instantiation, because the sub class instance + // isn't created yet. + protected lazy val reservedWords: Seq[String] = + this + .getClass + .getMethods + .filter(_.getReturnType == classOf[Keyword]) + .map(_.invoke(this).asInstanceOf[Keyword].normalize) + + // Set the keywords as empty by default, will change that later. + override val lexical = new SqlLexical + + protected case class Keyword(str: String) { + def normalize: String = lexical.normalizeKeyword(str) + def parser: Parser[String] = normalize + } + + def parse(input: String): LogicalPlan = { + synchronized { + phrase(start)(new lexical.Scanner(input)) match { + case Success(plan, _) => + plan + case failureOrError => + CarbonException.analysisException(failureOrError.toString) + } + } + } + + private lazy val start: Parser[LogicalPlan] = mvCommand + + private lazy val mvCommand: Parser[LogicalPlan] = + createMV | dropMV | showMV | rebuildMV Review comment: ```suggestion createMV | dropMV | showMV | refreshMV ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
jackylk commented on a change in pull request #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#discussion_r378069888 ########## File path: datamap/mv/core/src/main/scala/org/apache/carbondata/mv/extension/MVParser.scala ########## @@ -0,0 +1,204 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.mv.extension + +import scala.language.implicitConversions +import scala.util.matching.Regex +import scala.util.parsing.combinator.PackratParsers +import scala.util.parsing.combinator.syntactical.StandardTokenParsers + +import org.apache.spark.sql.{DataFrame, SparkSession} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.catalyst.{SqlLexical, TableIdentifier} +import org.apache.spark.sql.hive.CarbonMVRules +import org.apache.spark.sql.util.{CarbonException, SparkSQLUtil} + +import org.apache.carbondata.common.exceptions.sql.MalformedCarbonCommandException +import org.apache.carbondata.mv.extension.command.{CreateMaterializedViewCommand, DropMaterializedViewCommand, RebuildMaterializedViewCommand, ShowMaterializedViewCommand} +import org.apache.carbondata.mv.rewrite.MVUdf + +class MVParser extends StandardTokenParsers with PackratParsers { + + // Keywords used in this parser + protected val SELECT: Regex = carbonKeyWord("SELECT") + protected val CREATE: Regex = carbonKeyWord("CREATE") + protected val MATERIALIZED: Regex = carbonKeyWord("MATERIALIZED") + protected val VIEW: Regex = carbonKeyWord("VIEW") + protected val VIEWS: Regex = carbonKeyWord("VIEWS") + protected val AS: Regex = carbonKeyWord("AS") + protected val DROP: Regex = carbonKeyWord("DROP") + protected val SHOW: Regex = carbonKeyWord("SHOW") + protected val IF: Regex = carbonKeyWord("IF") + protected val EXISTS: Regex = carbonKeyWord("EXISTS") + protected val NOT: Regex = carbonKeyWord("NOT") + protected val MVPROPERTIES: Regex = carbonKeyWord("MVPROPERTIES") + protected val WITH: Regex = carbonKeyWord("WITH") + protected val DEFERRED: Regex = carbonKeyWord("DEFERRED") + protected val REBUILD: Regex = carbonKeyWord("REBUILD") + protected val ON: Regex = carbonKeyWord("ON") + protected val TABLE: Regex = carbonKeyWord("TABLE") + + /** + * This will convert key word to regular expression. + */ + private def carbonKeyWord(keys: String): Regex = { + ("(?i)" + keys).r + } + + implicit def regexToParser(regex: Regex): Parser[String] = { + import lexical.Identifier + acceptMatch( + s"identifier matching regex ${ regex }", + { case Identifier(str) if regex.unapplySeq(str).isDefined => str } + ) + } + + // By default, use Reflection to find the reserved words defined in the sub class. + // NOTICE, Since the Keyword properties defined by sub class, we couldn't call this + // method during the parent class instantiation, because the sub class instance + // isn't created yet. + protected lazy val reservedWords: Seq[String] = + this + .getClass + .getMethods + .filter(_.getReturnType == classOf[Keyword]) + .map(_.invoke(this).asInstanceOf[Keyword].normalize) + + // Set the keywords as empty by default, will change that later. + override val lexical = new SqlLexical + + protected case class Keyword(str: String) { + def normalize: String = lexical.normalizeKeyword(str) + def parser: Parser[String] = normalize + } + + def parse(input: String): LogicalPlan = { + synchronized { + phrase(start)(new lexical.Scanner(input)) match { + case Success(plan, _) => + plan + case failureOrError => + CarbonException.analysisException(failureOrError.toString) + } + } + } + + private lazy val start: Parser[LogicalPlan] = mvCommand + + private lazy val mvCommand: Parser[LogicalPlan] = + createMV | dropMV | showMV | rebuildMV Review comment: Because the command the REBUILD MATERIALIZED VIEW, so here is rebuildMV ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
jackylk commented on a change in pull request #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#discussion_r378069888 ########## File path: datamap/mv/core/src/main/scala/org/apache/carbondata/mv/extension/MVParser.scala ########## @@ -0,0 +1,204 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.mv.extension + +import scala.language.implicitConversions +import scala.util.matching.Regex +import scala.util.parsing.combinator.PackratParsers +import scala.util.parsing.combinator.syntactical.StandardTokenParsers + +import org.apache.spark.sql.{DataFrame, SparkSession} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.catalyst.{SqlLexical, TableIdentifier} +import org.apache.spark.sql.hive.CarbonMVRules +import org.apache.spark.sql.util.{CarbonException, SparkSQLUtil} + +import org.apache.carbondata.common.exceptions.sql.MalformedCarbonCommandException +import org.apache.carbondata.mv.extension.command.{CreateMaterializedViewCommand, DropMaterializedViewCommand, RebuildMaterializedViewCommand, ShowMaterializedViewCommand} +import org.apache.carbondata.mv.rewrite.MVUdf + +class MVParser extends StandardTokenParsers with PackratParsers { + + // Keywords used in this parser + protected val SELECT: Regex = carbonKeyWord("SELECT") + protected val CREATE: Regex = carbonKeyWord("CREATE") + protected val MATERIALIZED: Regex = carbonKeyWord("MATERIALIZED") + protected val VIEW: Regex = carbonKeyWord("VIEW") + protected val VIEWS: Regex = carbonKeyWord("VIEWS") + protected val AS: Regex = carbonKeyWord("AS") + protected val DROP: Regex = carbonKeyWord("DROP") + protected val SHOW: Regex = carbonKeyWord("SHOW") + protected val IF: Regex = carbonKeyWord("IF") + protected val EXISTS: Regex = carbonKeyWord("EXISTS") + protected val NOT: Regex = carbonKeyWord("NOT") + protected val MVPROPERTIES: Regex = carbonKeyWord("MVPROPERTIES") + protected val WITH: Regex = carbonKeyWord("WITH") + protected val DEFERRED: Regex = carbonKeyWord("DEFERRED") + protected val REBUILD: Regex = carbonKeyWord("REBUILD") + protected val ON: Regex = carbonKeyWord("ON") + protected val TABLE: Regex = carbonKeyWord("TABLE") + + /** + * This will convert key word to regular expression. + */ + private def carbonKeyWord(keys: String): Regex = { + ("(?i)" + keys).r + } + + implicit def regexToParser(regex: Regex): Parser[String] = { + import lexical.Identifier + acceptMatch( + s"identifier matching regex ${ regex }", + { case Identifier(str) if regex.unapplySeq(str).isDefined => str } + ) + } + + // By default, use Reflection to find the reserved words defined in the sub class. + // NOTICE, Since the Keyword properties defined by sub class, we couldn't call this + // method during the parent class instantiation, because the sub class instance + // isn't created yet. + protected lazy val reservedWords: Seq[String] = + this + .getClass + .getMethods + .filter(_.getReturnType == classOf[Keyword]) + .map(_.invoke(this).asInstanceOf[Keyword].normalize) + + // Set the keywords as empty by default, will change that later. + override val lexical = new SqlLexical + + protected case class Keyword(str: String) { + def normalize: String = lexical.normalizeKeyword(str) + def parser: Parser[String] = normalize + } + + def parse(input: String): LogicalPlan = { + synchronized { + phrase(start)(new lexical.Scanner(input)) match { + case Success(plan, _) => + plan + case failureOrError => + CarbonException.analysisException(failureOrError.toString) + } + } + } + + private lazy val start: Parser[LogicalPlan] = mvCommand + + private lazy val mvCommand: Parser[LogicalPlan] = + createMV | dropMV | showMV | rebuildMV Review comment: Because the command is called REBUILD MATERIALIZED VIEW, so here is rebuildMV ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
jackylk commented on a change in pull request #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#discussion_r378069888 ########## File path: datamap/mv/core/src/main/scala/org/apache/carbondata/mv/extension/MVParser.scala ########## @@ -0,0 +1,204 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.mv.extension + +import scala.language.implicitConversions +import scala.util.matching.Regex +import scala.util.parsing.combinator.PackratParsers +import scala.util.parsing.combinator.syntactical.StandardTokenParsers + +import org.apache.spark.sql.{DataFrame, SparkSession} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.catalyst.{SqlLexical, TableIdentifier} +import org.apache.spark.sql.hive.CarbonMVRules +import org.apache.spark.sql.util.{CarbonException, SparkSQLUtil} + +import org.apache.carbondata.common.exceptions.sql.MalformedCarbonCommandException +import org.apache.carbondata.mv.extension.command.{CreateMaterializedViewCommand, DropMaterializedViewCommand, RebuildMaterializedViewCommand, ShowMaterializedViewCommand} +import org.apache.carbondata.mv.rewrite.MVUdf + +class MVParser extends StandardTokenParsers with PackratParsers { + + // Keywords used in this parser + protected val SELECT: Regex = carbonKeyWord("SELECT") + protected val CREATE: Regex = carbonKeyWord("CREATE") + protected val MATERIALIZED: Regex = carbonKeyWord("MATERIALIZED") + protected val VIEW: Regex = carbonKeyWord("VIEW") + protected val VIEWS: Regex = carbonKeyWord("VIEWS") + protected val AS: Regex = carbonKeyWord("AS") + protected val DROP: Regex = carbonKeyWord("DROP") + protected val SHOW: Regex = carbonKeyWord("SHOW") + protected val IF: Regex = carbonKeyWord("IF") + protected val EXISTS: Regex = carbonKeyWord("EXISTS") + protected val NOT: Regex = carbonKeyWord("NOT") + protected val MVPROPERTIES: Regex = carbonKeyWord("MVPROPERTIES") + protected val WITH: Regex = carbonKeyWord("WITH") + protected val DEFERRED: Regex = carbonKeyWord("DEFERRED") + protected val REBUILD: Regex = carbonKeyWord("REBUILD") + protected val ON: Regex = carbonKeyWord("ON") + protected val TABLE: Regex = carbonKeyWord("TABLE") + + /** + * This will convert key word to regular expression. + */ + private def carbonKeyWord(keys: String): Regex = { + ("(?i)" + keys).r + } + + implicit def regexToParser(regex: Regex): Parser[String] = { + import lexical.Identifier + acceptMatch( + s"identifier matching regex ${ regex }", + { case Identifier(str) if regex.unapplySeq(str).isDefined => str } + ) + } + + // By default, use Reflection to find the reserved words defined in the sub class. + // NOTICE, Since the Keyword properties defined by sub class, we couldn't call this + // method during the parent class instantiation, because the sub class instance + // isn't created yet. + protected lazy val reservedWords: Seq[String] = + this + .getClass + .getMethods + .filter(_.getReturnType == classOf[Keyword]) + .map(_.invoke(this).asInstanceOf[Keyword].normalize) + + // Set the keywords as empty by default, will change that later. + override val lexical = new SqlLexical + + protected case class Keyword(str: String) { + def normalize: String = lexical.normalizeKeyword(str) + def parser: Parser[String] = normalize + } + + def parse(input: String): LogicalPlan = { + synchronized { + phrase(start)(new lexical.Scanner(input)) match { + case Success(plan, _) => + plan + case failureOrError => + CarbonException.analysisException(failureOrError.toString) + } + } + } + + private lazy val start: Parser[LogicalPlan] = mvCommand + + private lazy val mvCommand: Parser[LogicalPlan] = + createMV | dropMV | showMV | rebuildMV Review comment: Because the command is called REBUILD MATERIALIZED VIEW, so here is rebuildMV ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585063335 Build Success with Spark 2.4.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.4/247/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [WIP] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585080914 Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1950/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [CARBONDATA-3694] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585137491 Build Failed with Spark 2.4.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.4/258/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [CARBONDATA-3694] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585155283 Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1961/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [CARBONDATA-3694] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585259042 Build Success with Spark 2.4.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.4/267/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [CARBONDATA-3694] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585282977 Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1970/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [CARBONDATA-3694] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585756614 Build Success with Spark 2.4.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.4/277/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3612: [CARBONDATA-3694] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#issuecomment-585779269 Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1980/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
akashrn5 commented on a change in pull request #3612: [CARBONDATA-3694] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#discussion_r378946277 ########## File path: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DataMapSchema.java ########## @@ -290,4 +301,71 @@ public boolean isTimeSeries() { public void setTimeSeries(boolean timeSeries) { isTimeSeries = timeSeries; } + + public boolean supportIncrementalBuild() { Review comment: instead of `supportIncrementalBuild` how about `needIncrementalBuild` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
In reply to this post by GitBox
akashrn5 commented on a change in pull request #3612: [CARBONDATA-3694] Separate Materialized View command from DataMap command
URL: https://github.com/apache/carbondata/pull/3612#discussion_r378942524 ########## File path: common/src/main/java/org/apache/carbondata/common/exceptions/sql/MalformedMaterializedViewException.java ########## @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.common.exceptions.sql; + +import org.apache.carbondata.common.annotations.InterfaceAudience; +import org.apache.carbondata.common.annotations.InterfaceStability; + +/** + * This exception will be thrown when MV related SQL statement is invalid + */ +@InterfaceAudience.User +@InterfaceStability.Stable +public class MalformedMaterializedViewException extends MalformedCarbonCommandException { + /** Review comment: please give one line space ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
Free forum by Nabble | Edit this page |