You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Rishi (JIRA)" <ji...@apache.org> on 2015/07/27 12:39:06 UTC

[jira] [Created] (SPARK-9379) org.apache.spark.sql.catalyst.SqlParser should be extensible easily

Rishi created SPARK-9379:
----------------------------

             Summary: 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


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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org