[ 
https://issues.apache.org/jira/browse/CALCITE-6465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17890809#comment-17890809
 ] 

asdfgh19 commented on CALCITE-6465:
-----------------------------------

Unfortunately, after testing, flink-table-code-splitter cannot handle at least 
the following two scenarios correctly.

I am using Calcite's Enumerable Convention to run the following sql.

 
{code:java}
select * from TEST_AGG2 where OID in 
('a','a1','a2','a3','a4','a5','a6','a7','a8','a9','a10','a11','a12','a13','a14','a15','a16','a17','a18','a19','a20','a21','a22','a23','a24','a25','a26','a27','a28','a29','a30','a31','a32','a33','a34','a35','a36','a37','a38','a39','a40','a41','a42','a43','a44','a45','a46','a47','a48','a49','a50','a51','a52','a53','a54','a55','a56','a57','a58','a59','a60','a61','a62','a63','a64','a65','a66','a67','a68','a69','a70','a71','a72','a73','a74','a75','a76','a77','a78','a79','a80','a81','a82','a83','a84','a85','a86','a87','a88','a89','a90','a91','a92','a93','a94','a95','a96','a97','a98','a99')
 {code}
 

Scenario 1:

[^before_split_01.txt]

[^after_split_01.txt]

^The before_split_01.txt file contains the original Java code that can be 
executed correctly. The after_split_01.txt file contains the code after code 
splitting. It reports the following error during the compilation phase.^

 
{code:java}
Caused by: org.codehaus.commons.compiler.CompileException: Line 19, Column 110: 
Unknown variable or type "v1" {code}
 

 

^Scenario 2:^

^[^before_split_02.txt]^

^[^after_split_02.txt]^

^In scenario 2, the code after the split is even larger than before, so that 
the code that could have been compiled is now over 64KB. It seems that the 
flink JavaCodeSplitter cannot split the methods in anonymous inner classes, 
such as new AbstractEnumerable() {} or new Enumerator(){}
^

> Rework code generator to use Flink code splitter
> ------------------------------------------------
>
>                 Key: CALCITE-6465
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6465
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>            Reporter: James Duong
>            Assignee: James Duong
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>         Attachments: after_split_01.txt, after_split_02.txt, 
> before_split_01.txt, before_split_02.txt
>
>
> Holistically replace the (or provide a separate optional) code generator to 
> reduce issues such as CALCITE-3094 .
> One suggestion in the comments for CALCITE-3094 has been to use the [code 
> generator from 
> Flink.|https://nightlies.apache.org/flink/flink-docs-release-1.3/api/java/org/apache/flink/table/codegen/CodeGenerator.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to