Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.8.0
-
None
-
None
Description
The group key can not be select in the follows TableAPI:
val result = order
.groupBy('o_time.substring(1, 16))
.select('o_time.substring(1, 16), 'o_id.count)
Exception:
org.apache.flink.table.api.ValidationException: Cannot resolve field [o_time] given input [('o_time).substring(1, 16), TMP_0]. at org.apache.flink.table.plan.logical.LogicalNode.failValidation(LogicalNode.scala:156)
BTW, We can only use the following description to avoid the above problem.
val result = order .select('o_id, 'c_id, 'o_time.substring(1, 16) as 'key) .groupBy('key) .select('key, 'o_id.count)
But I think it is better to make `groupby udf()` can be select in TableAPI. What do you think?
Attachments
Issue Links
- is duplicated by
-
FLINK-6101 GroupBy fields with arithmetic expression (include UDF) can not be selected
- Closed