[ https://issues.apache.org/jira/browse/FLINK-8953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Renjie Liu reassigned FLINK-8953: --------------------------------- Assignee: Renjie Liu > Resolve unresolved field references in FieldComputer expressions > ---------------------------------------------------------------- > > Key: FLINK-8953 > URL: https://issues.apache.org/jira/browse/FLINK-8953 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL > Reporter: Timo Walther > Assignee: Renjie Liu > Priority: Major > > When implementing the {{FieldComputer.getExpression}} method, it is not > possible to use API classes but only internal expression case classes. > It would be great to also define timestamp extractors like: > {code} > def getExpression(fieldAccesses: Array[ResolvedFieldReference]): Expression > = { > // 'x.cast(Types.LONG) > // ExpressionParser.parseExpression("x.cast(LONG)") > } > {code} > An even better solution would be to provide different `getExpression()` > methods that an implementor can override. The general goal should be to > define this as natural as possible. In the future we should also support SQL: > {code} > def getJavaExpression(fieldAccesses: Array[ResolvedFieldReference]): String > = { > "x.cast(LONG)" > } > def getSQLExpression(fieldAccesses: Array[ResolvedFieldReference]): String > = { > "CAST(x AS LONG)" > } > {code} > The final design is still up for discussion. These are just ideas. -- This message was sent by Atlassian JIRA (v7.6.3#76005)