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

    https://github.com/apache/drill/pull/1033#discussion_r152901149
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestViewSupport.java ---
    @@ -311,6 +311,75 @@ public void createViewWhenViewAlreadyExists() throws 
Exception {
         }
       }
     
    +  @Test // DRILL-5952
    +  public void createViewIfNotExistsWhenTableAlreadyExists() throws 
Exception {
    +    final String tableName = generateViewName();
    +
    +    try {
    +      final String tableDef = "SELECT region_id, sales_city FROM 
cp.`region.json` ORDER BY `region_id` LIMIT 2";
    +
    +      test("CREATE TABLE %s.%s as %s", DFS_TMP_SCHEMA, tableName, 
tableDef);
    --- End diff --
    
    This test specifically tests the behavior when we try to create a view with 
the same name as an existing table in the intended schema. 



---

Reply via email to