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

Reduce stack depth by replace (string|array).size with (string|array).length

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • Spark Core, SQL
    • None

    Description

      There are a lot of (string|array).size called.
      In fact, the size calls the underlying length, this behavior increase the stack length.
      We should call (string|array).length directly.

      We also get the compile waring Replace .size with .length on arrays and strings

      Attachments

        Activity

          People

            beliefer Jiaan Geng
            beliefer Jiaan Geng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: