adarshsanjeev commented on code in PR #14780:
URL: https://github.com/apache/druid/pull/14780#discussion_r1289878229


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQErrorReport.java:
##########
@@ -195,10 +213,21 @@ public static MSQFault getFaultFromException(@Nullable 
final Throwable e)
         return new RowTooLargeFault(((FrameRowTooLargeException) 
cause).getMaxFrameSize());
       } else if (cause instanceof InvalidNullByteException) {
         InvalidNullByteException invalidNullByteException = 
(InvalidNullByteException) cause;
+        String columnName = invalidNullByteException.getColumn();
+        if (columnMappings != null) {
+          IntList outputColumnsForQueryColumn = 
columnMappings.getOutputColumnsForQueryColumn(columnName);
+
+          // outputColumnsForQueryColumn.size should always be 1 due to 
hasUniqueOutputColumnNames check that is done
+          if (outputColumnsForQueryColumn.size() >= 1) {

Review Comment:
   nit: Should we handle the case where it is more than 1 separately for 
neatness? That said, since this is code to handle a different type of 
exception, I am okay with the current code.



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