You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2026/09/03 05:10:00 UTC

[jira] [Assigned] (SPARK-59149) Use isEmpty/nonEmpty instead of size comparisons in the SQL modules

     [ https://issues.apache.org/jira/browse/SPARK-59149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun reassigned SPARK-59149:
-------------------------------------

    Assignee: Uroš Bojanić

> Use isEmpty/nonEmpty instead of size comparisons in the SQL modules
> -------------------------------------------------------------------
>
>                 Key: SPARK-59149
>                 URL: https://issues.apache.org/jira/browse/SPARK-59149
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.4.0
>            Reporter: Uroš Bojanić
>            Assignee: Uroš Bojanić
>            Priority: Minor
>              Labels: pull-request-available
>
> OrcUtils checks for an empty ORC schema two ways: readSchema uses reader.getSchema.getFieldNames.size == 0, while elsewhere the file uses .isEmpty (e.g. orcFieldNames.isEmpty). This changes the former to .isEmpty so the file is consistent and uses the idiomatic emptiness check. java.util.List.isEmpty() is exactly size() == 0, so behavior is identical.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org