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

    https://github.com/apache/tajo/pull/1016#discussion_r63132603
  
    --- Diff: 
tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/statistics/TableStats.java
 ---
    @@ -85,13 +88,17 @@ public TableStats(CatalogProtos.TableStatsProto proto) {
     
         this.columnStatses = new ArrayList<>();
         for (CatalogProtos.ColumnStatsProto colProto : proto.getColStatList()) 
{
    -      if (colProto.getColumn().getDataType().getType() == 
TajoDataTypes.Type.PROTOBUF) {
    +      if (peekType(colProto.getColumn().getType()) == PROTOBUF) {
             continue;
           }
           columnStatses.add(new ColumnStats(colProto));
         }
       }
     
    +  private static TajoDataTypes.Type peekType(TypeProto proto) {
    +    return proto.getElements(proto.getElementsCount() - 1).getKind();
    --- End diff --
    
    A TypeProto consists of a number of TypeElements, sorted in a depth-first 
order of nested types. The last element means its actual type instead of nested 
or children types. For example, a map type ```map<text, int>``` will be stored 
in the list of TypeElement as follows: ```[TEXT, INT, MAP]```. ```peekType()``` 
will just return ```MAP```.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to