arina-ielchiieva commented on a change in pull request #1477: DRILL-6753: Fix 
show files command to return result the same way as before
URL: https://github.com/apache/drill/pull/1477#discussion_r219710569
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/store/ischema/TestFilesTable.java
 ##########
 @@ -86,62 +102,46 @@ public void testSelectWithRecursion() throws Exception {
 
   @Test
   public void testShowFilesWithInCondition() throws Exception {
-    client.testBuilder()
-        .sqlQuery("show files in dfs.`files`")
-        .unOrdered()
-        .sqlBaselineQuery("select * from INFORMATION_SCHEMA.`FILES` where 
schema_name = 'dfs.files'")
-        .go();
+    checkCounts("show files in dfs.`files`",
+        "select * from INFORMATION_SCHEMA.`FILES` where schema_name = 
'dfs.files'");
   }
 
   @Test
-  public void testShowFilesForSpecificFolderSuccess() throws Exception {
+  public void testShowFilesForSpecificDirectory() throws Exception {
     try {
+      client.alterSession(ExecConstants.LIST_FILES_RECURSIVELY, false);
+      QueryBuilder queryBuilder = client.queryBuilder().sql("show files in 
dfs.`files`.folder1");
+      QueryBuilder.QuerySummary querySummary = queryBuilder.run();
+      assertTrue(querySummary.succeeded());
+      assertEquals(2, querySummary.recordCount());
+      // option has no effect
       client.alterSession(ExecConstants.LIST_FILES_RECURSIVELY, true);
-      client.testBuilder()
-          .sqlQuery("show files in dfs.`files`.folder")
-          .unOrdered()
-          .sqlBaselineQuery("select * from INFORMATION_SCHEMA.`FILES` where 
schema_name = 'dfs.files' and relative_path like 'folder/%'")
-          .go();
+      assertTrue(querySummary.succeeded());
 
 Review comment:
   @vvysotskyi nice catch, thanks. Fixed.

----------------------------------------------------------------
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

Reply via email to