[ 
https://issues.apache.org/jira/browse/SPARK-59149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110251#comment-18110251
 ] 

Uroš Bojanić commented on SPARK-59149:
--------------------------------------

In progress: https://github.com/apache/spark/pull/58449

> Use isEmpty instead of size == 0 in OrcUtils
> --------------------------------------------
>
>                 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
>
> 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]

Reply via email to