clintropolis commented on code in PR #12636:
URL: https://github.com/apache/druid/pull/12636#discussion_r900704888


##########
sql/src/main/java/org/apache/druid/sql/calcite/view/DruidViewMacro.java:
##########
@@ -58,6 +58,7 @@ public TranslatableTable apply(final List<Object> arguments)
   {
     final RelDataType rowType;
     try (final DruidPlanner planner = plannerFactory.createPlanner(viewSql, 
new QueryContext())) {
+      planner.validate(false);

Review Comment:
   Oh, I misunderstood what you were saying. Yes within the view's usage of the 
planner it is basically unauthorized on purpose, because the view itself as a 
whole is authorized as a `ResourceType.VIEW` by the `SqlLifecycle` of the query 
using the view. The planner usage here is to get the row type information so 
the query planner using the view can do its thing. #10812 has details on view 
authorization stuff (which is also the PR that left the comments that this PR 
is all about).



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