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


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/scan/ScanQueryFrameProcessor.java:
##########
@@ -223,27 +224,32 @@ protected ReturnOrAwait<Long> runWithInputChannel(
     }
   }
 
-  private void populateFrameWriterAndFlushIfNeeded() throws IOException
+  private void populateFrameWriterAndFlushIfNeeded()
   {
     createFrameWriterIfNeeded();
 
-    while (!cursor.isDone()) {
-      if (!frameWriter.addSelection()) {
-        if (frameWriter.getNumRows() > 0) {
-          final long numRowsWritten = flushFrameWriter();
+    try {
+      while (!cursor.isDone()) {
+        if (!frameWriter.addSelection()) {
+          if (frameWriter.getNumRows() > 0) {
+            final long numRowsWritten = flushFrameWriter();
 
-          if (runningCountForLimit != null) {
-            runningCountForLimit.addAndGet(numRowsWritten);
-          }
+            if (runningCountForLimit != null) {
+              runningCountForLimit.addAndGet(numRowsWritten);
+            }
 
-          return;
-        } else {
-          throw new FrameRowTooLargeException(currentAllocatorCapacity);
+            return;
+          } else {
+            throw new FrameRowTooLargeException(currentAllocatorCapacity);
+          }
         }
-      }
 
-      cursor.advance();
-      
partitionBoostVirtualColumn.setValue(partitionBoostVirtualColumn.getValue() + 
1);
+        cursor.advance();
+        
partitionBoostVirtualColumn.setValue(partitionBoostVirtualColumn.getValue() + 
1);
+      }
+    }
+    catch (Exception e) {

Review Comment:
   Thanks for catching this. I have reduced the surface of the try..catch block 
so as to not obstruct any other exceptions



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