Uroš Bojanić created SPARK-59149:
------------------------------------

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


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