cecemei commented on code in PR #17864:
URL: https://github.com/apache/druid/pull/17864#discussion_r2027468287


##########
processing/src/main/java/org/apache/druid/query/metadata/metadata/SegmentMetadataQuery.java:
##########
@@ -107,7 +110,13 @@ public SegmentMetadataQuery(
     this.toInclude = toInclude == null ? new AllColumnIncluderator() : 
toInclude;
     this.merge = merge == null ? false : merge;
     this.analysisTypes = analysisTypes;
-    if (!(dataSource instanceof TableDataSource || dataSource instanceof 
UnionDataSource)) {
+    if (dataSource instanceof RestrictedDataSource) {

Review Comment:
   yes, a user would not be able to issue `SegmentMetadataQuery` on a 
restricted data source. It was always this case since policy rollout. 
   
   Before this pr, external user fail with building the segment query with 
restricted ds, and internal service issue segment query with table data source. 
After this pr, external user fail with dstasource has restricted policy, and 
internal service issue segment query with restricted data source (with 
`NoRestrictionPolicy`).



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