You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/11/28 17:47:04 UTC

[GitHub] vdiravka commented on a change in pull request #1557: DRILL-6863: Drop table is not working if path within workspace starts…

vdiravka commented on a change in pull request #1557: DRILL-6863: Drop table is not working if path within workspace starts…
URL: https://github.com/apache/drill/pull/1557#discussion_r237191015
 
 

 ##########
 File path: exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestViewSupport.java
 ##########
 @@ -751,4 +751,53 @@ public void selectFromViewCreatedOnCalcite1_4() throws Exception {
         .baselineValues("HeadQuarters")
         .go();
   }
+
+  @Test
+  public void testDropViewNameStartsWithSlash() throws Exception {
+    String viewName = "views/tmp_view";
+    try {
+      test("CREATE VIEW `%s`.`%s` AS SELECT * FROM cp.`region.json`", DFS_TMP_SCHEMA, viewName);
+      testBuilder()
+          .sqlQuery("DROP VIEW `%s`.`%s`", DFS_TMP_SCHEMA, "/" + viewName)
+          .unOrdered()
+          .baselineColumns("ok", "summary")
+          .baselineValues(true,
+              String.format("View [%s] deleted successfully from schema [%s].", viewName, DFS_TMP_SCHEMA))
+          .go();
+    } finally {
+      test("DROP VIEW IF EXISTS `%s`.`%s`", DFS_TMP_SCHEMA, viewName);
+    }
+  }
+
+  @Test
+  public void testViewIsCreatedWithinWorkspace() throws Exception {
 
 Review comment:
   Do we need similar test cases for tables?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services