You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/06/01 16:20:19 UTC

[GitHub] [orc] pavibhai commented on a change in pull request #668: ORC-742: Added Lazy IO for non filter columns

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



##########
File path: java/core/src/java/org/apache/orc/impl/reader/StripePlanner.java
##########
@@ -445,55 +509,83 @@ private static boolean hasSomeRowGroups(boolean[] includedRowGroups) {
    * @return the list of disk  ranges that will be loaded
    */
   private BufferChunkList planPartialDataReading(OrcIndex index,
-                                                 @NotNull boolean[] includedRowGroups) {
+                                                 @NotNull boolean[] includedRowGroups,
+                                                 int startGroup,
+                                                 TypeReader.ReadPhase readPhase) {
     BufferChunkList result = new BufferChunkList();
     if (hasSomeRowGroups(includedRowGroups)) {
       InStream.StreamOptions compression = dataReader.getCompressionOptions();
       boolean isCompressed = compression.getCodec() != null;
       int bufferSize = compression.getBufferSize();
       OrcProto.RowIndex[] rowIndex = index.getRowGroupIndex();
       for (StreamInformation stream : dataStreams) {
-        if (RecordReaderUtils.isDictionary(stream.kind, encodings[stream.column])) {
-          addChunk(result, stream, stream.offset, stream.length);
+        if (readPhase == TypeReader.ReadPhase.ALL
+            ||(readPhase == TypeReader.ReadPhase.LEADERS

Review comment:
       > nit. space after ||
   done
   
   > nit. lets keep conditions on a single line
   brought the subcondition into a single line not the entire condition as it extends the line boundary significantly
   
   > nit. reduce new lines (e.g., processStream call)
   Fixed the processStream call however I am unclear on how to handle parameters. I have generally been following chompdown if long, I see both variants in the code chomp or just wrap.




-- 
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:
users@infra.apache.org