Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3808#discussion_r114899203
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/DataSetCalc.scala
---
@@ -83,24 +86,28 @@ class DataSetCalc(
val inputDS =
getInput.asInstanceOf[DataSetRel].translateToPlan(tableEnv)
- val returnType = FlinkTypeFactory.toInternalRowTypeInfo(getRowType)
-
val generator = new CodeGenerator(config, false, inputDS.getType)
+ val rowTypeInfo =
FlinkTypeFactory.toInternalRowTypeInfo(getRowType).asInstanceOf[RowTypeInfo]
+
val body = functionBody(
generator,
- inputDS.getType,
- getRowType,
+ new RowSchema(getInput.getRowType),
+ new RowSchema(getRowType),
calcProgram,
config)
val genFunction = generator.generateFunction(
ruleDescription,
classOf[FlatMapFunction[Row, Row]],
body,
- returnType)
+ rowTypeInfo)
+
+ val runner = new FlatMapRunner[Row, Row](
--- End diff --
why not keeping `calcMapFunction`? It should do the same.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---