[
https://issues.apache.org/jira/browse/SPARK-49408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun closed SPARK-49408.
---------------------------------
> 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
> Fix For: 3.4.4, 3.5.3, 4.0.0
>
> 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: [email protected]
For additional commands, e-mail: [email protected]