cgivre commented on a change in pull request #2445:
URL: https://github.com/apache/drill/pull/2445#discussion_r808375995
##########
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... the `UserSession` is only updated in the constructor. There is
now a `clone()` method which also updates the UserSession and an additional
constructor.
--
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]