[
https://issues.apache.org/jira/browse/FLINK-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15405553#comment-15405553
]
ASF GitHub Bot commented on FLINK-4247:
---------------------------------------
Github user twalthr commented on the issue:
https://github.com/apache/flink/pull/2298
@StephanEwen A user can also call `CsvInputFormat.nextRecord()` because it
is public, but this was never a problem. If we want to restrict visibility of
`TableSource` interface methods, we have to convert the interfaces to classes
and provide 3 class for batch, stream, batch&stream. Also not very nice.
In general, the Scala classes hide the Java API streams and environments
within the Table API. But in this case the user wants to implement a custom
TableSource and since the Table API is internally using the Java API I think it
is ok, if Java API and not Scala API is used for that.
> CsvTableSource.getDataSet() expects Java ExecutionEnvironment
> -------------------------------------------------------------
>
> Key: FLINK-4247
> URL: https://issues.apache.org/jira/browse/FLINK-4247
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Affects Versions: 1.1.0
> Reporter: Till Rohrmann
> Priority: Minor
>
> The Table API offers the {{CsvTableSource}} which can be used with the Java
> and Scala API. However, if used with the Scala API where on has obtained a
> {{scala.api.ExecutionEnvironment}} there is a problem with the
> {{CsvTableSource.getDataSet}} method. The method expects a
> {{java.api.ExecutionEnvironment}} to extract the underlying {{DataSet}}.
> Additionally it returns a {{java.api.DataSet}} instead of a
> {{scala.api.DataSet}}. I think we should also offer a Scala API specific
> CsvTableSource which works with the respective Scala counterparts.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)