[
https://issues.apache.org/jira/browse/FLINK-8274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16380925#comment-16380925
]
ASF GitHub Bot commented on FLINK-8274:
---------------------------------------
Github user walterddr commented on a diff in the pull request:
https://github.com/apache/flink/pull/5174#discussion_r171358583
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/CommonCalc.scala
---
@@ -46,10 +47,22 @@ trait CommonCalc {
returnSchema.fieldNames,
calcProjection)
+ val (defines, bodies, callings) = generateCalcSplitFunctions(
+ generator,
+ projection.codeBuffer,
+ config.getMaxGeneratedCodeLength)
+
+ val split = config.getMaxGeneratedCodeLength < projection.code.length
+ val projectionCode = if (split && !projection.codeBuffer.isEmpty) {
--- End diff --
We can probably add this to the `generatedCalcSplitFunctions`, and let it
always return the `samHeader` function (split or not), and with optional
`defines` and `bodies`. This encapsulates all splitting functionality in one
place, what do you think?
> Fix Java 64K method compiling limitation for CommonCalc
> -------------------------------------------------------
>
> Key: FLINK-8274
> URL: https://issues.apache.org/jira/browse/FLINK-8274
> Project: Flink
> Issue Type: Bug
> Components: Table API & SQL
> Affects Versions: 1.5.0
> Reporter: Ruidong Li
> Assignee: Ruidong Li
> Priority: Critical
>
> For complex SQL Queries, the generated code for {code}DataStreamCalc{code},
> {code}DataSetCalc{code} may exceed Java's method length limitation 64kb.
>
> This issue will split long method to several sub method calls.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)