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

Split codegen'd aggregation code into small functions for the HotSpot

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 3.0.0
    • SQL
    • None

    Description

      In SPARK-21603, we got performance regression if the HotSpot didn't compile too long functions (the limit is 80000 in bytecode size).
      I checked and I found the codegen of `HashAggregateExec` frequently goes over the limit, for example:

      spark.range(10000000).selectExpr("id % 1024 AS a", "id AS b").write.saveAsTable("t")
      sql("SELECT a, KURTOSIS(b)FROM t GROUP BY a")
      

      This query goes over the limit and the actual bytecode size is `12356`.
      So, it might be better to split the aggregation code into piecies.

      Attachments

        Issue Links

          Activity

            People

              maropu Takeshi Yamamuro
              maropu Takeshi Yamamuro
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: