flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mushketyk <...@git.apache.org>
Subject [GitHub] flink pull request #3039: [FLINK-5280] Update TableSource to support nested ...
Date Fri, 23 Dec 2016 13:16:31 GMT
Github user mushketyk commented on a diff in the pull request:

    --- Diff: flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaTableSource.java
    @@ -111,24 +112,17 @@
     		return kafkaSource;
    -	@Override
    -	public int getNumberOfFields() {
    -		return fieldNames.length;
    -	}
    -	@Override
     	public String[] getFieldsNames() {
    -		return fieldNames;
    +		return TableSource$class.getFieldsNames(this);
    --- End diff --
    `CsvTableSource` is inheriting both `StreamTableSource` and `BatchTableSource` so they
should be traits.
    I don't think that adding a method that only calling implementation from a trait is a
big issue. In any case we do not duplicate the code and do not re-implement methods.
    Do you have any concerns about this?

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.

View raw message