You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Krzysztof Chmielewski <kr...@gmail.com> on 2021/12/16 22:21:42 UTC

Antlr usage in FLink

Hi,
I was cruising through Flink's source code and I have noticed that one of
the modules contains a lexer and parser g4 files for Java.

I'm fairly familiar with Antlr4 btw. and I was wondering for what Flink
uses Antlr4 with Java g4 files.

Regards,
Krzysztof Chmielewski

Re: Antlr usage in FLink

Posted by Caizhi Weng <ts...@gmail.com>.
Hi!

Are you talking about the java code splitter module?

Flink will change user SQL into several Java classes and run them in
distributed JVMs. However due to some constraints in JVM, a single Java
method can't be longer than 64KB (in byte code). This constraint is easily
exceeded with a very complex SQL.

To solve this problem we introduce the java code splitter module in Flink
1.14 to split a long Java method into several shorter methods to work
around this constraint.

Krzysztof Chmielewski <kr...@gmail.com> 于2021年12月17日周五
06:22写道:

> Hi,
> I was cruising through Flink's source code and I have noticed that one of
> the modules contains a lexer and parser g4 files for Java.
>
> I'm fairly familiar with Antlr4 btw. and I was wondering for what Flink
> uses Antlr4 with Java g4 files.
>
> Regards,
> Krzysztof Chmielewski
>