Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-18118

SpecificSafeProjection.apply of Java Object from Dataset to JavaRDD Grows Beyond 64 KB

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.0.3, 2.1.0
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      Description

      For sufficiently wide or nested Java Objects, when SpecificSafeProjection attempts to recreate the object from an InternalRow, the generated SpecificSafeProjection.apply method is larger than allowed:

      Caused by: org.codehaus.janino.JaninoRuntimeException: Code of method "apply(Ljava/lang/Object;)Ljava/lang/Object;" of class "org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificSafeProjection" grows beyond 64 KB
      

      Although related, this issue appears not to have been resolved by SPARK-15285. Since there is only one top-level object when projecting, splitExpressions finds no additional Expressions to split. The result is a single large, nested Expression that forms the apply code.

      See the reproducer for an example [1].

      [1] - https://github.com/bdrillard/specific-safe-projection-error

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiszk Kazuaki Ishizaki
                Reporter:
                aeskilson Aleksander Eskilson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: