cryptoe commented on code in PR #14534:
URL: https://github.com/apache/druid/pull/14534#discussion_r1258085591
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/sql/resources/SqlStatementResource.java:
##########
@@ -150,16 +152,12 @@ public Response doPost(final SqlQuery sqlQuery, @Context
final HttpServletReques
);
if (ExecutionMode.ASYNC != executionMode) {
return buildNonOkResponse(
- DruidException.forPersona(DruidException.Persona.USER)
- .ofCategory(DruidException.Category.INVALID_INPUT)
- .build(
- StringUtils.format(
- "The statement sql api only supports sync
mode[%s]. Please set context parameter [%s=%s] in the context payload",
- ExecutionMode.ASYNC,
- QueryContexts.CTX_EXECUTION_MODE,
- ExecutionMode.ASYNC
- )
- )
+ InvalidInput.exception(
+ "The statement sql api only supports sync mode[%s]. Please set
context parameter [%s=%s] in the context payload",
Review Comment:
Since the sql statement api will support the "SYNC" mode soon, I wanted the
user to set the flag explicitly.
Rolling upgrades then become easy since we donot have a default
mode/overridden mode.
The mode also changes the way the results are fetched.
If the mode set is async, the results are fetched via the results api.
If the mode set is 'sync', then the results are streamed back in the same
post request. (At-least, that's how I envision it. )
--
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]