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


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/sql/MSQTaskQueryMaker.java:
##########
@@ -281,6 +284,13 @@ public QueryResponse<Object[]> runQuery(final DruidQuery 
druidQuery)
                .tuningConfig(new MSQTuningConfig(maxNumWorkers, 
maxRowsInMemory, rowsPerSegment, indexSpec))
                .build();
 
+    final SegmentSource segmentSources = 
MultiStageQueryContext.getSegmentSources(sqlQueryContext);
+    if (MSQControllerTask.isReplaceInputDataSourceTask(querySpec) && 
SegmentSource.REALTIME.equals(segmentSources)) {
+      throw DruidException.forPersona(DruidException.Persona.USER)
+                          .ofCategory(DruidException.Category.INVALID_INPUT)
+                          .build("REALTIME segment sources cannot be queried 
while reindexing into the same datasource.");

Review Comment:
   Add the data source name to the error message in both places. 
   Also can we push up the validation to a common utils class so that it can be 
used in both places. 



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