xiangfu0 commented on code in PR #19877:
URL: https://github.com/apache/pinot/pull/19877#discussion_r4278292482
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -2275,8 +2276,8 @@ private static void collectLookupTableNames(@Nullable
Expression expression, Set
if (LOOKUP_FUNCTION.equals(functionCall.getOperator()) &&
!operands.isEmpty()) {
Literal tableName = operands.get(0).getLiteral();
// A non-literal table name is rejected by LookupTransformFunction on
the server
- if (tableName != null && tableName.isSetStringValue()) {
- lookupTableNames.add(tableName.getStringValue());
+ if (tableName != null) {
Review Comment:
Nit (non-blocking): dropping the `isSetStringValue()` guard also lets array
literals through here, e.g. `lookup(ARRAY[1,2], ...)`. `getStringValue()` on an
array falls back to `int[].toString()` (`[I@...`), so the broker would run an
auth check against that garbage name. It's not a bypass — the server rejects an
array first-arg anyway (it's an `ArrayLiteralTransformFunction`, not a
`LiteralTransformFunction`) — but such a query would now be denied with an auth
error instead of the clearer "First argument must be a literal". Fine to leave,
just flagging the slight behavior shift.
--
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]