Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1032#discussion_r150686157
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
 ---
    @@ -532,7 +572,10 @@ public boolean isMutable() {
         }
     
         public DrillFileSystem getFS() {
    -      return fs;
    +      if (this.fs == null) {
    +        this.fs = 
ImpersonationUtil.createFileSystem(schemaConfig.getUserName(), fsConf);
    +      }
    +      return this.fs;
    --- End diff --
    
    This class caches the file system, which is good. The other classes in this 
PR do not; they create the fs as needed.
    
    Does Calcite allow some kind of session state in which we can cache the fs 
for the query (plan) rather than creating it on the fly each time we need it?


---

Reply via email to