[
https://issues.apache.org/jira/browse/ORC-840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
William Hyun closed ORC-840.
----------------------------
> Remove Superfluous Array Fill in RecordReaderImpl
> -------------------------------------------------
>
> Key: ORC-840
> URL: https://issues.apache.org/jira/browse/ORC-840
> Project: ORC
> Issue Type: Improvement
> Affects Versions: 1.8.0
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Fix For: 1.8.0
>
>
> {code:java}
> public static int[] mapSargColumnsToOrcInternalColIdx(
> List<PredicateLeaf> sargLeaves,
> SchemaEvolution evolution) {
> int[] result = new int[sargLeaves.size()];
> Arrays.fill(result, -1);
> for(int i=0; i < result.length; ++i) {
> String colName = sargLeaves.get(i).getColumnName();
> result[i] = findColumns(evolution, colName);
> }
> return result;
> }
> {code}
> There is no reason here to pre-populate {{result}} with -1 values. They are
> promptly overwritten in the following loop.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)