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_r237475983
##########
File path: exec/java-exec/src/test/java/org/apache/drill/TestDropTable.java
##########
@@ -220,4 +218,36 @@ public void testDropTableIfExistsWhileItIsAView() throws
Exception {
test(DROP_VIEW_IF_EXISTS, viewName);
}
}
+
+ @Test
+ public void testDropTableNameStartsWithSlash() throws Exception {
+ String tableName = "test_table";
+ try {
+ test(CREATE_SIMPLE_TABLE, tableName);
+ testBuilder()
+ .sqlQuery(DROP_TABLE, "/" + tableName)
+ .unOrdered()
+ .baselineColumns("ok", "summary")
+ .baselineValues(true, String.format("Table [%s] dropped", tableName))
+ .go();
+ } finally {
+ test(DROP_TABLE_IF_EXISTS, tableName);
+ }
+ }
+
+ @Test
+ public void testDropTemporaryTableNameStartsWithSlash() throws Exception {
Review comment:
This case is (implicitly) covered in
`TestCTTAS#testTemporaryTableWithAndWithoutLeadingSlashAreTheSame()` as it
ensures that table w/ and w/o slash are the same during creation.
----------------------------------------------------------------
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