[
https://issues.apache.org/jira/browse/SPARK-9379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14643850#comment-14643850
]
Michael Armbrust commented on SPARK-9379:
-----------------------------------------
This is a private API that is not intended to be extended internally (and is
likely to change between releases). We have plug-able SQL dialects. Is that
sufficient?
> org.apache.spark.sql.catalyst.SqlParser should be extensible easily
> --------------------------------------------------------------------
>
> Key: SPARK-9379
> URL: https://issues.apache.org/jira/browse/SPARK-9379
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 1.4.1
> Reporter: Rishi
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> When extending org.apache.spark.sql.catalyst.SqlParser we are usually stuck
> with Scala limitation of not able to override lazy vals and refer super
> values from it . (See http://www.scala-lang.org/old/node/11315.html) . This
> can be avoided with a simple alteration to SqlPasrer.scala. See patch below.
> - protected lazy val start: Parser[LogicalPlan] =
> - start1 | insert | cte
> + protected lazy val start: Parser[LogicalPlan] = allParsers
> +
> + protected def allParsers = start1 | insert | cte
> This will allow subclasses of SqlParser to override only "allParsers" . This
> will also ease of upgrading through spark revisions
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]