[ 
https://issues.apache.org/jira/browse/FLINK-4879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

yuemeng updated FLINK-4879:
---------------------------
    Description: 
class KafkaTableSource should be public just like KafkaTableSink,by 
default,it's modifier is default ,and we cann't access out of it's package,
for example:
 def createKafkaTableSource(
      topic: String,
      properties: Properties,
      deserializationSchema: DeserializationSchema[Row],
      fieldsNames: Array[String],
      typeInfo: Array[TypeInformation[_]]): KafkaTableSource = {

    if (deserializationSchema != null) {
      new Kafka09TableSource(topic, properties, deserializationSchema, 
fieldsNames, typeInfo)
    } else {
      new Kafka09JsonTableSource(topic, properties, fieldsNames, typeInfo)
    }
  }


Because of the class KafkaTableSource modifier is default,we cann't define this 
function result type with KafkaTableSource ,we must give the specific type.
if some other kafka source extends KafkaTableSource ,and we don't sure which 
subclass of KafkaTableSource should be use,how can we specific the type?




  was:
class KafkaTableSource should be public just like KafkaTableSink,by 
default,it's modifier is default ,and we cann't access out of it's package,for 
example:
 def createKafkaTableSource(
      topic: String,
      properties: Properties,
      deserializationSchema: DeserializationSchema[Row],
      fieldsNames: Array[String],
      typeInfo: Array[TypeInformation[_]]): KafkaTableSource = {

    if (deserializationSchema != null) {
      new Kafka09TableSource(topic, properties, deserializationSchema, 
fieldsNames, typeInfo)
    } else {
      new Kafka09JsonTableSource(topic, properties, fieldsNames, typeInfo)
    }
  }


Because of the class KafkaTableSource modifier is default,we cann't define this 
function result type with KafkaTableSource ,we must give the specific type.
if some other kafka source extends KafkaTableSource ,and we don't sure which 
subclass of KafkaTableSource should be use,how can we specific the type?





> class KafkaTableSource should be public just like KafkaTableSink
> ----------------------------------------------------------------
>
>                 Key: FLINK-4879
>                 URL: https://issues.apache.org/jira/browse/FLINK-4879
>             Project: Flink
>          Issue Type: Bug
>          Components: Kafka Connector
>    Affects Versions: 1.1.1, 1.1.3
>            Reporter: yuemeng
>            Priority: Minor
>             Fix For: 1.1.4
>
>
> class KafkaTableSource should be public just like KafkaTableSink,by 
> default,it's modifier is default ,and we cann't access out of it's package,
> for example:
>  def createKafkaTableSource(
>       topic: String,
>       properties: Properties,
>       deserializationSchema: DeserializationSchema[Row],
>       fieldsNames: Array[String],
>       typeInfo: Array[TypeInformation[_]]): KafkaTableSource = {
>     if (deserializationSchema != null) {
>       new Kafka09TableSource(topic, properties, deserializationSchema, 
> fieldsNames, typeInfo)
>     } else {
>       new Kafka09JsonTableSource(topic, properties, fieldsNames, typeInfo)
>     }
>   }
> Because of the class KafkaTableSource modifier is default,we cann't define 
> this function result type with KafkaTableSource ,we must give the specific 
> type.
> if some other kafka source extends KafkaTableSource ,and we don't sure which 
> subclass of KafkaTableSource should be use,how can we specific the type?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to