ASF GitHub Bot commented on FLINK-8538:

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

    --- Diff: 
    @@ -32,11 +32,36 @@ import scala.collection.mutable
     class Schema extends Descriptor {
    +  private var deriveFields: Option[String] = None
       // maps a field name to a list of properties that describe type, origin, 
and the time attribute
       private val tableSchema = mutable.LinkedHashMap[String, 
mutable.LinkedHashMap[String, String]]()
       private var lastField: Option[String] = None
    +  /**
    +    * Derives field names and types from a preceding connector or format. 
Additional fields that
    +    * are defined in this schema extend the derived fields. The derived 
fields are
    +    * added in an alphabetical order according to their field name.
    +    */
    +  def deriveFieldsAlphabetically(): Schema = {
    --- End diff --
    I think we should support inferring the format from the schema rather than 
the schema from the format.
    This would be more aligned with how it would work in a `CREATE TABLE` 
statement and how Hive is doing it for example. We should still support to 
define the format explicitly though.

> 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

Reply via email to