abhishekrb19 commented on code in PR #15168:
URL: https://github.com/apache/druid/pull/15168#discussion_r1362389304


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/util/MultiStageQueryContext.java:
##########
@@ -350,4 +359,53 @@ static IndexSpec decodeIndexSpec(@Nullable final Object 
indexSpecObject, final O
       throw QueryContexts.badValueException(CTX_INDEX_SPEC, "an indexSpec", 
indexSpecObject);
     }
   }
+
+  /**
+   * This method is used to validate and get the taskLockType from the 
queryContext.
+   * If the queryContext does not contain the taskLockType, then {@link 
TaskLockType#EXCLUSIVE} is used for replace queries and
+   * {@link TaskLockType#SHARED} is used for insert queries.
+   * If the queryContext contains the taskLockType, then it is validated and 
returned.
+   */
+  public static TaskLockType validateAndGetTaskLockType(QueryContext 
queryContext, boolean isReplaceQuery)

Review Comment:
   In my mind, `!isReplaceQuery` means an `INSERT` or `SELECT` query. I see 
it's invoked only in the context of ingestion, but would also be good to 
clarify that in the javadoc since this context is common to all queries.



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