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


##########
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:
   Woudn't FrameRowTooLargeException be caught here?



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