Jackie-Jiang commented on code in PR #16728:
URL: https://github.com/apache/pinot/pull/16728#discussion_r2373823721
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/InternalFunctions.java:
##########
@@ -72,28 +71,54 @@ public static long startTime(String input) {
/// This is mostly useful for test and internal usage
@ScalarFunction
public static long endTime(String input) {
- return QueryThreadContext.getActiveDeadlineMs();
+ return
QueryThreadContext.get().getExecutionContext().getActiveDeadlineMs();
}
- /// Returns the [broker id][QueryThreadContext#getBrokerId] of the query.
+ /// Returns the broker id of the query.
///
/// The input value is not directly used. Instead it is here to control
whether the function is called during query
/// optimization or execution. In order to do the latter, a non-constant
value (like a column) should be passed as
/// input.
///
/// This is mostly useful for test and internal usage
@ScalarFunction
- @Nullable
public static String brokerId(String input) {
- return QueryThreadContext.getBrokerId();
+ return QueryThreadContext.get().getExecutionContext().getBrokerId();
Review Comment:
They are not commonly used, so I kept them at the query level for clarity.
--
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]