[
https://issues.apache.org/jira/browse/CALCITE-4701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17390286#comment-17390286
]
Julian Hyde commented on CALCITE-4701:
--------------------------------------
Yes, external projects extending Calcite's SQL parser is an important use case.
Extending parsers is a hard problem, and what we have achieved with FMPP is
pretty good.
Improving things for external projects is more important than improving our
internal build (e.g. Babel). The VMWare PR is a good use case to try to improve.
There is
[documentation|https://calcite.apache.org/docs/adapter.html#extending-the-parser].
Let's extend that.
I also noticed [a StackOverflow
question|https://stackoverflow.com/questions/56351095/extending-calcite-parser-to-adding-custom-relational-operators]
(answered by [~mmior] in 2019).
> Implement and publish Gradle plugin for extending the parser
> ------------------------------------------------------------
>
> Key: CALCITE-4701
> URL: https://issues.apache.org/jira/browse/CALCITE-4701
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.27.0
> Reporter: Vladimir Sitnikov
> Priority: Major
>
> Currently, calcite-core.jar contains the relevant parser template files,
> however, the usage of the templates is not clear from the client perspective
> (especially when you are new to Calcite).
> It would be nice if Calcite published a plugin that simplifies building a
> parser extension.
> We could reuse the same plugin in calcite-babel module. Currently babel
> references $rootDir/core/... directrly rather than fetching the parser
> templates from core jar.
> It might make sense to ship parser templates in its own jar file, however, I
> have no strong opinion here. Parser.jj consumes <1% of the compressed jar
> size(225K compresses to 44K), so it is not a big deal, yet having a
> meaningful artifact name for the parser templates looks like the right thing
> to do.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)