Github user attilapiros commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20702#discussion_r172003781
  
    --- Diff: 
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
 ---
    @@ -665,6 +667,25 @@ public void close() throws HiveSQLException {
         }
       }
     
    +  private void cleanupPipeoutFile() {
    +    String lScratchDir = hiveConf.getVar(ConfVars.LOCALSCRATCHDIR);
    +    String sessionID = hiveConf.getVar(ConfVars.HIVESESSIONID);
    +
    +    File[] fileAry = new File(lScratchDir).listFiles(
    --- End diff --
    
    No problem. I hope this works.
    
    ```
    File[] fileAry = new File(lScratchDir).listFiles(
          (dir, name) -> name.startsWith(sessionID) && 
name.endsWith(".pipeout"));
    ```
    
    I think it would be good if you would have one unit test for your change.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to