Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/975#discussion_r143265009
  
    --- Diff: 
contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseRecordReader.java
 ---
    @@ -109,11 +110,14 @@ public HBaseRecordReader(Connection connection, 
HBaseSubScan.HBaseSubScanSpec su
             byte[] family = root.getPath().getBytes();
             transformed.add(SchemaPath.getSimplePath(root.getPath()));
             PathSegment child = root.getChild();
    -        if (child != null && child.isNamed()) {
    -          byte[] qualifier = child.getNameSegment().getPath().getBytes();
    -          hbaseScan.addColumn(family, qualifier);
    -        } else {
    -          hbaseScan.addFamily(family);
    +        if (!completeFamilies.contains(new String(family))) {
    +          if (child != null && child.isNamed()) {
    +            byte[] qualifier = child.getNameSegment().getPath().getBytes();
    +            hbaseScan.addColumn(family, qualifier);
    +          } else {
    +            hbaseScan.addFamily(family);
    +            completeFamilies.add(new String(family));
    +          }
    --- End diff --
    
    This code would greatly benefit from a comment to explain what's happening. 
Would suggest a Javadoc comment for the function explaining the transform rules.


---

Reply via email to