srowen commented on a change in pull request #24018: [SPARK-23749][SQL] 
Workaround built-in Hive api changes (phase 1)
URL: https://github.com/apache/spark/pull/24018#discussion_r264004180
 
 

 ##########
 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().size() == 0) {
 
 Review comment:
   Could even use `isEmpty` here

----------------------------------------------------------------
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