drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abhipol <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-951:CSV header row should be parsed
Date Tue, 03 Nov 2015 07:21:23 GMT
Github user abhipol commented on a diff in the pull request:

    https://github.com/apache/drill/pull/232#discussion_r43721299
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/compliant/CompliantTextRecordReader.java
---
    @@ -71,15 +79,14 @@ public CompliantTextRecordReader(FileSplit split, DrillFileSystem
dfs, FragmentC
       // checks to see if we are querying all columns(star) or individual columns
       @Override
       public boolean isStarQuery() {
    -    if(settings.isUseRepeatedVarChar()) {
    -      return super.isStarQuery() || Iterables.tryFind(getColumns(), new Predicate<SchemaPath>()
{
    -        @Override
    -        public boolean apply(@Nullable SchemaPath path) {
    -          return path.equals(RepeatedVarCharOutput.COLUMNS);
    -        }
    -      }).isPresent();
    -    }
    -    return super.isStarQuery();
    +    if (super.isStarQuery()) { return true; }
    --- End diff --
    
    not sure if I understood your suggestion. it does work with columns[] (ext csv) and named
field cases (ext csvh), star and non star queries.
    Since it was not function of UseRepeatedVarChar I simplified the code


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