Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/877#discussion_r132407801
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
 ---
    @@ -222,15 +222,17 @@ public DrillTable isReadable(DrillFileSystem fs, 
FileSelection selection,
               // create a metadata context that will be used for the duration 
of the query for this table
               MetadataContext metaContext = new MetadataContext();
     
    -          ParquetTableMetadataDirs mDirs = Metadata.readMetadataDirs(fs, 
dirMetaPath.toString(), metaContext, formatConfig);
    -          if (mDirs.getDirectories().size() > 0) {
    -            FileSelection dirSelection = 
FileSelection.createFromDirectories(mDirs.getDirectories(), selection,
    -                selection.getSelectionRoot() /* cacheFileRoot initially 
points to selectionRoot */);
    -            dirSelection.setExpandedPartial();
    -            dirSelection.setMetaContext(metaContext);
    -
    -            return new DynamicDrillTable(fsPlugin, storageEngineName, 
userName,
    -                new FormatSelection(plugin.getConfig(), dirSelection));
    +          ParquetTableMetadataDirs mDirs = Metadata.readMetadataDirs(fs, 
dirMetaPath, metaContext, formatConfig);
    +          if (mDirs != null) {
    +            if (mDirs.getDirectories().size() > 0) {
    --- End diff --
    
    Can we combine two `if` statements into one?


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