cgivre commented on a change in pull request #2445:
URL: https://github.com/apache/drill/pull/2445#discussion_r802171298



##########
File path: 
exec/java-exec/src/main/java/org/apache/calcite/jdbc/DynamicSchema.java
##########
@@ -32,23 +33,34 @@
  */
 public class DynamicSchema extends SimpleCalciteSchema implements 
AutoCloseable {
 
-  public DynamicSchema(CalciteSchema parent, Schema schema, String name) {
+  private UserSession session;
+
+  public DynamicSchema(CalciteSchema parent, Schema schema, String name, 
UserSession session) {
     super(parent, schema, name);
+    this.session = session;
   }
 
   @Override
   protected CalciteSchema getImplicitSubSchema(String schemaName,
                                                boolean caseSensitive) {
     Schema s = schema.getSubSchema(schemaName);
     if (s != null) {
-      return new DynamicSchema(this, s, schemaName);
+      return new DynamicSchema(this, s, schemaName, session);
     }
     return getSubSchemaMap().get(schemaName);
   }
 
+  public UserSession getSession() {
+    return session;
+  }
+
+  public void setSession(UserSession session) {

Review comment:
       Fixed.  `UserSession` is now passed only in constructors.




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


Reply via email to