clintropolis commented on a change in pull request #6974: sql support for 
dynamic parameters
URL: https://github.com/apache/druid/pull/6974#discussion_r370594378
 
 

 ##########
 File path: 
sql/src/main/java/org/apache/druid/sql/calcite/planner/PlannerContext.java
 ##########
 @@ -58,23 +60,27 @@
   private final PlannerConfig plannerConfig;
   private final DateTime localNow;
   private final Map<String, Object> queryContext;
+  private final List<TypedValue> parameters;
   private final AuthenticationResult authenticationResult;
   private final String sqlQueryId;
   private final List<String> nativeQueryIds = new CopyOnWriteArrayList<>();
 
+
   private PlannerContext(
       final DruidOperatorTable operatorTable,
       final ExprMacroTable macroTable,
       final PlannerConfig plannerConfig,
       final DateTime localNow,
       final Map<String, Object> queryContext,
+      final List<TypedValue> parameters,
       final AuthenticationResult authenticationResult
   )
   {
     this.operatorTable = operatorTable;
     this.macroTable = macroTable;
     this.plannerConfig = Preconditions.checkNotNull(plannerConfig, 
"plannerConfig");
     this.queryContext = queryContext != null ? new HashMap<>(queryContext) : 
new HashMap<>();
+    this.parameters = parameters != null ? parameters : ImmutableList.of();
 
 Review comment:
   Changed, though it ends up meaning that `SqlLifecycle` and `DruidStatement` 
both initialize this to an empty list, since the set parameters methods are not 
called unless there are parameters, so I'm not sure it's necessarily better, 
but maybe is slightly more explicit.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to