godfreyhe commented on a change in pull request #9274:
[FLINK-13495][table-planner-blink] blink-planner should support
varchar/char/decimal precision to connector
URL: https://github.com/apache/flink/pull/9274#discussion_r311013858
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/PhysicalTableSourceScan.scala
##########
@@ -60,8 +64,14 @@ abstract class PhysicalTableSourceScan(
def getSourceTransformation(
streamEnv: StreamExecutionEnvironment): Transformation[_] = {
if (sourceTransform == null) {
- sourceTransform = tableSource.asInstanceOf[StreamTableSource[_]].
- getDataStream(streamEnv).getTransformation
+ sourceTransform = tableSource match {
+ case format: InputFormatTableSource[_] =>
+ streamEnv.createInput(
+ format.getInputFormat.asInstanceOf[InputFormat[Any, _ <:
InputSplit]],
+
fromDataTypeToTypeInfo(format.getProducedDataType).asInstanceOf[TypeInformation[Any]]
Review comment:
please add some comments about why not call
`InputFormatTableSource#getDataStream` directly
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services