You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/07/15 19:25:12 UTC
[GitHub] [druid] clintropolis commented on a diff in pull request #12636: Today is that day - Single pass through Calcite planner
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org