Hey there,
I have to extend Flink's SQL-parser such that it accepts and evaluates
select-queries with different syntax.
Furthermore I use Eclipse Oxygen with Maven plugin and Flink Release 1.8.
0.
What I believe to know:
For parsing SQL-queries Flink-Table uses Apache Calcite's SQL-parser.
Flink-Table-Planner is the only module that references the Calcite-Core
which contains the parser ("Parser.jj" ?).
Therefore I want to import Flink-Table-Planner and Calcite-Core as local
projects in Eclipse and edit the files "config.fmpp" and "parserImpls.ftl".
After that I want to create a new "Parser.jj" file with Apache Freemaker (I
assume there are some tutorials?).
What I don't know:
Is it a promising plan or are there better strategies to extend the parser?
I already tried to import Flink-Table-Planner but I got many errors which
might refer to a Scala-problem with Eclipse. Do I have to switch to say
IntelliJ? Furthermore I'm not yet clear about how exactly I can extend the
parser. Are there any manuals/tutorials to teach me adding a new
SELECT-syntax? I already came across the parser extension test but it
didn't give me the answers I was looking for.
Thanks for your help!
Regards,
Dominik Gröninger