You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by twalthr <gi...@git.apache.org> on 2018/03/01 16:12:42 UTC

[GitHub] flink pull request #5613: [FLINK-8274] [table] Split generated methods for p...

GitHub user twalthr opened a pull request:

    https://github.com/apache/flink/pull/5613

    [FLINK-8274] [table] Split generated methods for preventing compiler exceptions

    ## What is the purpose of the change
    
    This PR splits a result record into multiple methods that evaluate a field. This prevents compiler exceptions such as mentioned in FLINK-8274. In comparison to #5174 this PR prevents the exception for all generated functions and also covers corner cases such as timestamps.
    
    ## Brief change log
    
    - Splitting added to code generation classes
    
    ## Verifying this change
    
    See added unit tests.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): no
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
      - The serializers: no
      - The runtime per-record code paths (performance sensitive): yes
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no
      - The S3 file system connector: no
    
    ## Documentation
    
      - Does this pull request introduce a new feature? no
      - If yes, how is the feature documented? JavaDocs


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/twalthr/flink FLINK-8274_3

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/5613.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5613
    
----
commit 5e967692887b403a7d86805b21956773ed9c6f02
Author: Timo Walther <tw...@...>
Date:   2018-03-01T15:26:21Z

    [FLINK-8274] [table] Split generated methods for preventing compiler exceptions

----


---

[GitHub] flink issue #5613: [FLINK-8274] [table] Split generated methods for preventi...

Posted by Xpray <gi...@git.apache.org>.
Github user Xpray commented on the issue:

    https://github.com/apache/flink/pull/5613
  
    @twalthr I'm fine with this PR.
    Best


---

[GitHub] flink issue #5613: [FLINK-8274] [table] Split generated methods for preventi...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/5613
  
    @Xpray yes that might be necessary as well. I think this code does not solve all problems but the most urgent ones. It still fails if expressions in a field become too large or the unboxing. Or even the class itself. There are many limitation that could be reached:
    https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.9
    Do you have use cases where you reach the limits with my current implementation?


---

[GitHub] flink issue #5613: [FLINK-8274] [table] Split generated methods for preventi...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/5613
  
    @Xpray what do you think about this approach?


---

[GitHub] flink issue #5613: [FLINK-8274] [table] Split generated methods for preventi...

Posted by Xpray <gi...@git.apache.org>.
Github user Xpray commented on the issue:

    https://github.com/apache/flink/pull/5613
  
    @twalthr yes that your PR have solved the urgent ones.
    I have cases with huge unboxing code but we can still split it in this way.
    As for large section codes of one field we may have to make the local variables to member field and split, we might finally use sub classes to avoid JVM's limitation.



---

[GitHub] flink pull request #5613: [FLINK-8274] [table] Split generated methods for p...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/5613


---

[GitHub] flink issue #5613: [FLINK-8274] [table] Split generated methods for preventi...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/5613
  
    @Xpray and @hequn8128 are you fine with merging this PR for now and then open follow-up issues for more splitting (unboxing, expression, class)?


---

[GitHub] flink issue #5613: [FLINK-8274] [table] Split generated methods for preventi...

Posted by hequn8128 <gi...@git.apache.org>.
Github user hequn8128 commented on the issue:

    https://github.com/apache/flink/pull/5613
  
    Hi @twalthr 
    Current implementation will reach the limits if a field becomes too large. This can be reproduced by creating a filed produced by concat_ws(). see https://github.com/hequn8128/flink/commit/871fb2c7723c11dd0b75176a3be3be70e2740b2b
    Best, Hequn



---

[GitHub] flink issue #5613: [FLINK-8274] [table] Split generated methods for preventi...

Posted by Xpray <gi...@git.apache.org>.
Github user Xpray commented on the issue:

    https://github.com/apache/flink/pull/5613
  
    It looks great, how about splitting reuseInputUnboxCode as well?  I found UnboxingCode might be oversized and has to split. 


---

[GitHub] flink issue #5613: [FLINK-8274] [table] Split generated methods for preventi...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/5613
  
    Merging for now and opening more issue around this topic.


---