Github user hequn8128 commented on a diff in the pull request:
https://github.com/apache/flink/pull/3696#discussion_r111320841
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamCorrelate.scala
---
@@ -36,14 +36,14 @@ import org.apache.flink.types.Row
class DataStreamCorrelate(
cluster: RelOptCluster,
traitSet: RelTraitSet,
- inputNode: RelNode,
--- End diff --
hi, sorry for missing any commons about this fix. After decoration phase,
the class type of inputNode is `HepRelVertex` and it will throws
ClassCastException at `val inputDS =
inputNode.asInstanceOf[DataStreamRel].translateToPlan(tableEnv)`. You can
reproduce this exception by running tests in
`DataStreamUserDefinedFunctionITCase`. The reason why there is no problems
after runVolcanoPlanner is that `DataStreamCorrelateRule` does the
transformation from `RelSubset` to `DataStreamRel`. I think it's better to
override the `input` parameter and use `getInput` when translate to plan. What
do you think, thx~
---
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.
---