Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/996#discussion_r146816101
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/exec/store/dfs/TestFileSelection.java
 ---
    @@ -63,4 +63,17 @@ public void testEmptyFolderThrowsTableNotFound() throws 
Exception {
         }
       }
     
    +  @Test(expected = Exception.class)
    +  public void testWrongSchemaThrowsSchemaNotFound() throws Exception {
    +    final String table = String.format("%s/empty", 
TestTools.getTestResourcesPath());
    +    final String query = String.format("select * from dfs1.`%s`", table);
    +    try {
    +      testNoResult(query);
    +    } catch (Exception ex) {
    +      final String pattern = String.format("[[dfs1]] is not valid with 
respect to either root schema or current default schema").toLowerCase();
    +      final boolean isSchemaNotFound = 
ex.getMessage().toLowerCase().contains(pattern);
    +      assertTrue(isSchemaNotFound);
    +      throw ex;
    +    }
    +  }
    --- End diff --
    
    Can you please add test case for the incorrect workspace, 
    a. `select * from dfs.incorrect_wk.table;`
    b. 
    ```
    use dfs; 
    select * from incorrect_wk.table;
    ```
    I assume it will return incorrect schema exception as well? 


---

Reply via email to