MaxGekk commented on a change in pull request #24018: [SPARK-23749][SQL] 
Replace built-in Hive API (isSub/toKryo) and remove OrcProto.Type usage
URL: https://github.com/apache/spark/pull/24018#discussion_r365571834
 
 

 ##########
 File path: 
sql/hive/src/main/java/org/apache/hadoop/hive/ql/io/orc/SparkOrcNewRecordReader.java
 ##########
 @@ -42,8 +41,11 @@
 
   public SparkOrcNewRecordReader(Reader file, Configuration conf,
       long offset, long length) throws IOException {
-    List<OrcProto.Type> types = file.getTypes();
-    numColumns = (types.size() == 0) ? 0 : types.get(0).getSubtypesCount();
+    if (file.getTypes().isEmpty()) {
 
 Review comment:
   The compiler prints warnings for the code:
   ```
   
/Users/maxim/proj/orc-eliminate-warning/sql/hive/src/main/java/org/apache/hadoop/hive/ql/io/orc/SparkOrcNewRecordReader.java
   Warning:(44, 13) java: getTypes() in org.apache.orc.Reader has been 
deprecated
   Warning:(47, 24) java: getTypes() in org.apache.orc.Reader has been 
deprecated
   ```
   I am going to rewrite it slightly. I am wondering how this was tested?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to