KazydubB 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_r237396700
##########
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:
Added such 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:
[email protected]
With regards,
Apache Git Services