Github user wuchong commented on the issue:

    https://github.com/apache/flink/pull/3149
  
    Sorry for the late response. 
    
    Regarding to the `HBaseTableSchema`, I agree with that to move the 
`addColumn(...)` method into `HBaseTableSource`. 
    
    Regarding to the nested vs flat schema, I prefer the nested schema. It is 
more intuitive to use.
    As for the nested schema doesn't support to push projections down, I think 
we should extend `ProjectableTableSource` to support push projections down to a 
composite type. We can keep the interface unchanged, i.e. `def 
projectFields(fields: Array[Int]): ProjectableTableSource[T]`. But the index of 
`fields` should be the flat index. We can use the flat field indexes to do 
projection pushdown even if it is a nested schema.
    
    For example, a table source with schema `a: Int, b: Row<b1: String, b2: 
Int>, c: Boolean`, the flat indexes of `a, b.b1, b.b2, c` are `0, 1, 2, 3`. So 
a project `SELECT b.b1, c FROM T` will result a `fields` `Array(1,3)`.
    
    What do you think ? 
    
    
    For me the biggest drawback of a nested schema is the lacking support to 
push projections down. 


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