pavibhai commented on a change in pull request #635:
URL: https://github.com/apache/orc/pull/635#discussion_r600002178



##########
File path: java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java
##########
@@ -2854,11 +2924,19 @@ public static TypeReader 
createTreeReader(TypeDescription readerType,
     }
   }
 
+  public static boolean isDecimalAsLong(OrcFile.Version version, int 
precision) {
+    return version == OrcFile.Version.UNSTABLE_PRE_2_0 &&
+    precision <= TypeDescription.MAX_DECIMAL64_PRECISION;
+  }
+
   public static BatchReader createRootReader(TypeDescription readerType, 
Context context)
           throws IOException {
     TypeReader reader = createTreeReader(readerType, context);
     if (reader instanceof StructTreeReader) {
-      return new StructBatchReader((StructTreeReader) reader, context);
+      return new StructBatchReader(reader, context);
+    } else if (reader instanceof LevelTypeReader
+               && ((LevelTypeReader)reader).getReader() instanceof 
StructTreeReader) {
+      return new LevelStructBatchReader((LevelTypeReader) reader, context);

Review comment:
       the logic has been moved into the Struct and Union TreeReaders instead.




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


Reply via email to