[ https://issues.apache.org/jira/browse/SPARK-49408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kent Yao reassigned SPARK-49408: -------------------------------- Assignee: Frank Wong > Poor performance in ProjectingInternalRow > ----------------------------------------- > > Key: SPARK-49408 > URL: https://issues.apache.org/jira/browse/SPARK-49408 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.5.2 > Reporter: Frank Wong > Assignee: Frank Wong > Priority: Major > Labels: pull-request-available > Attachments: 20240827-172739.html > > > In {*}ProjectingInternalRow{*}, the *colOrdinals* is passed as a {_}List{_}. > According to the Scala documentation, the _{{apply}}_ method for _{{List}}_ > has a linear time complexity, and it is used in all methods of > ProjectingInternalRow for every row. This can have a significant impact on > performance. > The following flame graph was captured in a {*}merge into sql{*}. A > considerable amount of time was spent on {{{}List.apply{}}}. Changing this to > _{{IndexedSeq}}_ would improve the performance. > > [^20240827-172739.html] > [https://docs.scala-lang.org/overviews/collections-2.13/performance-characteristics.html] -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org