Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-25491

Code generation: init method exceeds 64 KB when there is a large IN filter with Table API

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      When using Table API (Blink planner), if you are filtering using an IN filter with a lot of values, e.g. $(colName).in(<many values>), it will result in the error

       

      Code of method "<init>(...)V" of class "BatchExecCal$3006" grows beyond 64 KB

       

      The size of the init method mainly comes from the below method, which initializes the hash set with all the values in the filter.
      addReusableHashSet in CodeGeneratorContext.scala

      https://github.com/apache/flink/blob/master/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/CodeGeneratorContext.scala#L409

       

      This affects older versions as well, with 1.14.2 being the latest version that exhibits this issue.

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            TsReaper Caizhi Weng
            yccheng Daniel Cheng
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment