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

clean up the implementation of `growToSize` in CompactBuffer

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.3.0
    • Component/s: Spark Core
    • Labels:
      None

      Description

      two issues:

      1. the arrayMax should be `ByteArrayMethods.MAX_ROUNDED_ARRAY_LENGTH `
      2. I believe some `-2` were introduced because `Integer.Max_Value` was used previously. We should make the calculation of newArrayLen concise.

        Attachments

          Activity

            People

            • Assignee:
              kiszk Kazuaki Ishizaki
              Reporter:
              liufeng.ee@gmail.com Feng Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: