LakshSingla commented on code in PR #14780:
URL: https://github.com/apache/druid/pull/14780#discussion_r1289921676
##########
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:
I think it should be fine since even if there are multiple columns for a
single query column, to surface the exception, we can only display one name,
and displaying the first one seems okay.
If the code which throws `InvalidNullByteException` instead showed all the
columns with values \0 in them (which I think won't be possible), we can modify
it, however as the code currently is, we throw on encountering the first value
with \0.
--
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]