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

    https://github.com/apache/drill/pull/519#discussion_r70532442
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
 ---
    @@ -211,9 +217,76 @@ public void testNoSupportedError() throws Exception {
             .go();
       }
     
    +  @Test // DRILL-4530
    +  public void testDrill4530_1() throws Exception {
    +    // create metadata cache
    +    test(String.format("refresh table metadata dfs_test.`%s/%s`", 
getDfsTestTmpSchemaLocation(), tableName2));
    +    checkForMetadataFile(tableName2);
    +
    +    // run query and check correctness
    +    String query1 = String.format("select dir0, dir1, o_custkey, 
o_orderdate from dfs_test.`%s/%s` " +
    +            " where dir0=1995 and dir1='Q3'",
    +        getDfsTestTmpSchemaLocation(), tableName2);
    +    int expectedRowCount = 20;
    +    int expectedNumFiles = 2;
    +
    +    int actualRowCount = testSql(query1);
    +    assertEquals(expectedRowCount, actualRowCount);
    +    String numFilesPattern = "numFiles=" + expectedNumFiles;
    +    String usedMetaPattern = "usedMetadataFile=true";
    +    String cacheFileRootPattern = String.format("%s/%s/1995/Q3", 
getDfsTestTmpSchemaLocation(), tableName2);
    --- End diff --
    
    The verification of cacheFileRootPattern probably need put "cacheFileRoot=" 
as the prefix. Otherwise,  the list of files in GroupScan will always find a 
match for cacheFileRoot, right?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to