Github user sunjincheng121 commented on a diff in the pull request:
https://github.com/apache/flink/pull/3743#discussion_r112620324
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/call.scala
---
@@ -49,6 +57,128 @@ case class Call(functionName: String, args:
Seq[Expression]) extends Expression
}
/**
+ * Over expression for calcite over transform.
+ *
+ * @param agg over-agg expression
+ * @param aggAlias agg alias for following `select()` clause.
+ * @param overWindowAlias over window alias
+ * @param overWindow over window
+ */
+case class OverCall(
--- End diff --
Can we check `partitionBy` as following(In `toRexNode `method):
```
overWindow.partitionBy.foreach {
x =>
val partitionKey =
relBuilder.field(x.asInstanceOf[UnresolvedFieldReference].name)
if (!FlinkTypeFactory.toTypeInfo(partitionKey.getType).isKeyType) {
ValidationException(
s"expression $partitionKey cannot be used as a partition key
expression " +
"because it's not a valid key type which must be hashable and
comparable")
}
```
Because It's not work(can not resolve the partition key field) when I add
`partitionBy` into children, and add check logic into `validateInput` method.
`def children: Seq[Expression] = Seq(agg) ++ overWindow.partitionBy`
Is there something wrong in the code ?
---
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.
---