drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mehant <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3535: Add support for Drop Table
Date Thu, 03 Sep 2015 02:14:29 GMT
Github user mehant commented on a diff in the pull request:

    https://github.com/apache/drill/pull/140#discussion_r38607640
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/BasicFormatMatcher.java
---
    @@ -72,7 +72,7 @@ public boolean supportDirectoryReads() {
     
       @Override
       public FormatSelection isReadable(DrillFileSystem fs, FileSelection selection) throws
IOException {
    -    if (isReadable(fs, selection.getFirstPath(fs))) {
    +    if (isFileReadable(fs, selection.getFirstPath(fs))) {
    --- End diff --
    
    You are right, ParquetFormatMatcher overrides isReadable to first check if the directory
contains the metadata file, if not it delegates to the base class method to check if a particular
file is readable or not. 
    
    The existing naming is a bit confusing. In BasicFormatMatcher there are two methods with
the same name:
    
    1. FormatSelection isReadable(DrillFileSystem fs, FileSelection selection) -> operates
on directory level
    2. boolean isReadable(DrillFileSystem fs, FileStatus status) -> operates on a single
file level.
    
    I've renamed the second to be called isFileReadable and exposed it in the abstract class
so drop can invoke it on every file. 
    
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message