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

[jira] [Updated] (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 ]

Uroš Bojanić updated SPARK-59149:
---------------------------------
    Summary: Use isEmpty/nonEmpty instead of size comparisons in the SQL modules  (was: Use isEmpty instead of size == 0 in the SQL modules)

> 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ć
>            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