Github user wuchong commented on the issue:

    https://github.com/apache/flink/pull/3039
  
    What about extracting `getDataSet(ExecutionEnvironment)` and 
`getDataStream(StreamExecutionEnvironment)` to interfaces that called like 
`DataSetGetter` and `DataStreamGetter`. 
    
    And we can make `BatchTableSource` extend `TableSource` abstract class and 
implement  `DataSetGetter` interface. Make `StreamTableSource` extend 
`TableSource` abstract class and implement  `DataStreamGetter` interface. And  
make `BatchStreamTableSource` implement both `DataSetGetter` and 
`DataStreamGetter`.  So that we can use `TableSource` plus `DataSetGetter` 
where only `BatchTableSource` is expected. For example, the 
`BatchTableSourceScan` can be changed to like this: 
    
    ```scala
    class BatchTableSourceScan(
        cluster: RelOptCluster,
        traitSet: RelTraitSet,
        table: RelOptTable,
        val tableSource: TableSource[_],
        val datasetGetter: DataSetGetter)
    ```
    
    Can this solve our problem ? 
    



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to