Github user fhueske commented on the pull request:

    https://github.com/apache/flink/pull/1624#issuecomment-183251312
  
    Hi, I thought about using POJOs as native types within Table/SQL operators. 
IMO, the gains are very little compared to the added code complexity. Given a 
POJO input, we can preserve the input type only for very few operations such as 
a Filter. For most other operations, we need to generate a new output type 
(Tuple or Row). I am a bit skeptical about adding a lot of codeGen code with 
special cases for POJOs (such as the field index mapping) which is very seldom 
used. Moreover, POJO field accesses (for operations and serialization) go 
through reflection and are not very efficient. So even the performance gain for 
those few cases where POJOs can be used is not clear.
    
    I do not question the native type support in general. Tuples and primitives 
should definitely be supported, but I don't think we need to support POJOs 
within Table / SQL operators. Instead, I would convert POJO datasets into Row 
tables during table scan. Most of the code in this PR can be used to implement 
a codeGen'd converter Map function.
    
    What do you think @twalthr?



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