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


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

Review Comment:
   if there are two cursors, CursorA with RowSignatureA and CursorB with 
RowSignatureB and the cursor is at the last row of CursorA, populate call will 
return `false`, i.e. the two cursors cannot be batched together, and set 
`currentRowSignature` to the RowSignatureB (i.e. prepare the variables for the 
next write). We still want to return the old frame with the old signature 
therefore we need to preserve the signature with which we have written the 
frame. 
   Per your previous suggestion, `frameWriterFactory.signature()` would be 
sufficient and cleaner, and I will use that 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.

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