[ 
https://issues.apache.org/jira/browse/FLINK-8538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16374571#comment-16374571
 ] 

ASF GitHub Bot commented on FLINK-8538:
---------------------------------------

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

    https://github.com/apache/flink/pull/5564#discussion_r170224845
  
    --- Diff: 
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaJsonTableSource.java
 ---
    @@ -83,10 +84,32 @@ protected JsonRowDeserializationSchema 
getDeserializationSchema() {
     
        @Override
        public String explainSource() {
    -           return "KafkaJSONTableSource";
    +           return "KafkaJsonTableSource";
        }
     
    -   //////// SETTERS FOR OPTIONAL PARAMETERS
    +   @Override
    +   public boolean equals(Object o) {
    +           if (this == o) {
    +                   return true;
    +           }
    +           if (!(o instanceof KafkaJsonTableSource)) {
    +                   return false;
    +           }
    +           if (!super.equals(o)) {
    +                   return false;
    +           }
    +           KafkaJsonTableSource that = (KafkaJsonTableSource) o;
    +           return failOnMissingField == that.failOnMissingField &&
    +                   Objects.equals(jsonSchema, that.jsonSchema) &&
    +                   Objects.equals(fieldMapping, that.fieldMapping);
    +   }
    +
    +   @Override
    +   public int hashCode() {
    +           return Objects.hash(super.hashCode(), jsonSchema, fieldMapping, 
failOnMissingField);
    --- End diff --
    
    `TableSchema` does not override `hashCode()`


> Add a Kafka table source factory with JSON format support
> ---------------------------------------------------------
>
>                 Key: FLINK-8538
>                 URL: https://issues.apache.org/jira/browse/FLINK-8538
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Xingcan Cui
>            Priority: Major
>
> Similar to CSVTableSourceFactory a Kafka table source factory for JSON should 
> be added. This issue includes improving the existing JSON descriptor with 
> validation that can be used for other connectors as well. It is up for 
> discussion if we want to split the KafkaJsonTableSource into connector and 
> format such that we can reuse the format for other table sources as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to