LakshSingla commented on code in PR #16619:
URL: https://github.com/apache/druid/pull/16619#discussion_r1644580613


##########
processing/src/main/java/org/apache/druid/query/scan/ScanResultValueFramesIterable.java:
##########
@@ -200,26 +229,33 @@ public FrameSignaturePair next()
       // start all the processing
       populateCursor();
       boolean firstRowWritten = false;
-      // While calling populateCursor() repeatedly, currentRowSignature might 
change. Therefore we store the signature
+      // While calling populateCursor() repeatedly, currentRowSignature might 
change. Therefore, we store the signature
       // with which we have written the frames
-      final RowSignature writtenSignature = currentRowSignature;
+      final RowSignature writtenSignature = trimmedRowSignature;
       FrameWriterFactory frameWriterFactory = 
FrameWriters.makeFrameWriterFactory(
           FrameType.COLUMNAR,
           memoryAllocatorFactory,
-          currentRowSignature,
+          trimmedRowSignature,
           Collections.emptyList()
       );
       Frame frame;
-      try (final FrameWriter frameWriter = 
frameWriterFactory.newFrameWriter(new SettableCursorColumnSelectorFactory(
-          () -> currentCursor,
-          currentRowSignature
-      ))) {
+      try (final FrameWriter frameWriter = frameWriterFactory.newFrameWriter(
+          new SettableCursorColumnSelectorFactory(() -> currentCursor, 
currentRowSignature))) {
         while (populateCursor()) { // Do till we don't have any more rows, or 
the next row isn't compatible with the current row
           if (!frameWriter.addSelection()) { // Add the cursor's row to the 
frame, till the frame is full
             break;
           }
+
+          for (Integer columnNumber : nullTypedColumns) {

Review Comment:
   No reason to use FastUtil IntList as such. I just thought it might be faster 
to create than an arraylist.
   
   >  this could be moved into some method like validateRow - that will 
naturally do a CSE of the currentRows.get(currentRowIndex) so that it will be 
only evaluated once
   
   It is getting evaluated once here right? Unless I misinterpreted your 
comment 
   
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to