FrankChen021 commented on code in PR #20647:
URL: https://github.com/apache/druid/pull/20647#discussion_r4325497598


##########
extensions-contrib/grpc-query/src/main/java/org/apache/druid/grpc/server/QueryDriver.java:
##########
@@ -318,6 +323,7 @@ private SqlQueryPlus translateQuery(QueryRequest request, 
AuthenticationResult a
                        .sql(request.getQuery())
                        .systemDefaultContext(queryConfigProvider.getContext())
                        .queryContext(translateContext(request))
+                       
.rejectUnknownParameters(queryContextConfig.isRejectUnknownParameters())

Review Comment:
   [P2] Validate native gRPC query contexts
   
   **Finding:** The Broker-only gRPC module applies rejectUnknownParameters 
only to SQL translation. Native queries bypass QueryContextParameterValidator, 
allowing unknown or invalid context values to evade the new Broker-side 
preflight validation.
   
   **Suggestion:** Validate query.getContext() before native query lifecycle 
initialization and map BadQueryContextException to a request-error response; 
add a strict-mode native gRPC test.



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