clintropolis commented on code in PR #12636:
URL: https://github.com/apache/druid/pull/12636#discussion_r922457993
##########
sql/src/main/java/org/apache/druid/sql/calcite/view/DruidViewMacro.java:
##########
@@ -58,7 +58,8 @@ public TranslatableTable apply(final List<Object> arguments)
{
final RelDataType rowType;
try (final DruidPlanner planner = plannerFactory.createPlanner(viewSql,
new QueryContext())) {
- rowType = planner.plan().rowType();
+ planner.validate();
+ rowType = planner.prepare().getRowType();
Review Comment:
any reason to switch to prepare row type or just to do a bit less work?
##########
sql/src/main/java/org/apache/druid/sql/SqlLifecycle.java:
##########
@@ -248,46 +256,44 @@ private ValidationResult validate(AuthenticationResult
authenticationResult)
}
}
- private Access doAuthorize(final Access authorizationResult)
+ private void doAuthorize(Function<Set<ResourceAction>, Access> authorizer)
{
+ Access authorizationResult = planner.authorize(
+ authorizer,
+ authConfig.authorizeQueryContextParams());
Review Comment:
super nit: formatting, the last `)` should be on the following line, this is
one of those edge cases the style bots don't catch for whatever reason (i seem
to recall it being some limitation in .. something.. somewhere).
--
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]