[ https://issues.apache.org/jira/browse/HIVE-26260?focusedWorklogId=773827&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-773827 ]
ASF GitHub Bot logged work on HIVE-26260: ----------------------------------------- Author: ASF GitHub Bot Created on: 24/May/22 00:30 Start Date: 24/May/22 00:30 Worklog Time Spent: 10m Work Description: dongjoon-hyun opened a new pull request, #3318: URL: https://github.com/apache/hive/pull/3318 ### What changes were proposed in this pull request? This PR aims to use `org.apache.orc.Reader.getSchema` instead of the deprecated `org.apache.orc.Reader.getTypes` API. ### Why are the changes needed? `getTypes` was deprecated. - https://github.com/apache/orc/blob/main/java/core/src/java/org/apache/orc/Reader.java#L144 ```java /** * Get the list of types contained in the file. The root type is the first * type in the list. * @return the list of flattened types * @deprecated use getSchema instead * @since 1.1.0 */ List<OrcProto.Type> getTypes(); ``` In addition, AS-IS implementation is only a slow-wrapper. - https://github.com/apache/orc/blob/1e2962064b209f1b00188877f08d4226da85c640/java/core/src/java/org/apache/orc/impl/ReaderImpl.java#L259-L262 ```java @Override public List<OrcProto.Type> getTypes() { return OrcUtils.getOrcTypes(schema); } ``` - https://github.com/apache/orc/blob/1e2962064b209f1b00188877f08d4226da85c640/java/core/src/java/org/apache/orc/OrcUtils.java#L108-L112 ```java public static List<OrcProto.Type> getOrcTypes(TypeDescription typeDescr) { List<OrcProto.Type> result = new ArrayList<>(); appendOrcTypes(result, typeDescr); return result; } ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs Issue Time Tracking ------------------- Worklog Id: (was: 773827) Remaining Estimate: 0h Time Spent: 10m > Use `Reader.getSchema` instead of deprecated `Reader.getTypes` > -------------------------------------------------------------- > > Key: HIVE-26260 > URL: https://issues.apache.org/jira/browse/HIVE-26260 > Project: Hive > Issue Type: Improvement > Components: ORC > Affects Versions: 3.2.0 > Reporter: Dongjoon Hyun > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.7#820007)