Akshat-Jain opened a new pull request, #19147:
URL: https://github.com/apache/druid/pull/19147

   ### Description
   
   Problem: `SELECT * FROM TABLE(APPEND('testTable1', 'testTable2'))` was 
returning 403 Forbidden even when the user has READ permission on both 
datasources, because the authorization check was matching against quoted names 
(`'testTable1'`) instead of unquoted names (`testTable1`).
   
   This PR's changes are the following:
     - Fix 403 authorization error when querying with `TABLE(APPEND(...))` 
syntax
     - `TableAppendMacro#computeResources()` was using `operand.toString()` 
which included SQL quotes around datasource names (e.g., `'testTable1'` instead 
of `testTable1`), causing permission matching to fail
     - Changed to `((SqlLiteral) operand).getValueAs(String.class)` to extract 
the unquoted datasource name
     - Added resource analysis test for `TABLE(APPEND(...))` in 
`DruidPlannerResourceAnalyzeTest`. Also verified with basic-security enabled, 
`select * from table(append('t1','t2'))` succeeds for a user with READ 
permission on `t1` and `t2`
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.


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