[
https://issues.apache.org/jira/browse/SPARK-59149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun resolved SPARK-59149.
-----------------------------------
Fix Version/s: 5.0.0
Resolution: Fixed
Issue resolved by pull request 58449
[https://github.com/apache/spark/pull/58449]
> 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
> Fix For: 5.0.0
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]