Github user KurtYoung commented on a diff in the pull request:
https://github.com/apache/flink/pull/3277#discussion_r100270646
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/BatchTableEnvironment.scala
---
@@ -285,28 +286,37 @@ abstract class BatchTableEnvironment(
* @return The [[DataSet]] that corresponds to the translated [[Table]].
*/
protected def translate[A](table: Table)(implicit tpe:
TypeInformation[A]): DataSet[A] = {
- val dataSetPlan = optimize(table.getRelNode)
- translate(dataSetPlan)
+ val relNode = table.getRelNode
+ val dataSetPlan = optimize(relNode)
+ translate(dataSetPlan, relNode.getRowType)
}
/**
- * Translates a logical [[RelNode]] into a [[DataSet]].
+ * Translates a logical [[RelNode]] into a [[DataSet]]. Converts to
target type if necessary.
*
* @param logicalPlan The root node of the relational expression tree.
* @param tpe The [[TypeInformation]] of the resulting
[[DataSet]].
* @tparam A The type of the resulting [[DataSet]].
* @return The [[DataSet]] that corresponds to the translated [[Table]].
*/
- protected def translate[A](logicalPlan: RelNode)(implicit tpe:
TypeInformation[A]): DataSet[A] = {
+ protected def translate[A](
+ logicalPlan: RelNode,
+ logicalType: RelDataType)
--- End diff --
And if it is indeed needed, we should update method comment as well
---
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.
---