flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink issue #3039: [FLINK-5280] Update TableSource to support nested data
Date Fri, 06 Jan 2017 11:04:51 GMT
Github user fhueske commented on the issue:

    https://github.com/apache/flink/pull/3039
  
    Which `getTypeIndicies` methods are you referring to? `TableSource` does only have `getReturnType`,
`getFieldNames` and `getFieldIndicies`. If we move the latter two to a separate interface,
only `getReturnType` is left.
    
    Also I think this is typical OO design. We do not need reflection to check if an object
implements an interface. That's a very common operation in Java and Scala. A simple, `isInstanceOf[DefinesFieldNames]`
in `TableSourceTable` is sufficient to check whether the table source implements the interface
or not.
    
    Isn't this a good compromise of having a lean interface (also simple for Java users) and
at the same time the possibility to override field names if necessary?


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