You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "xueyu (JIRA)" <ji...@apache.org> on 2018/10/29 13:17:00 UTC
[jira] [Assigned] (FLINK-8953) Resolve unresolved field references
in FieldComputer expressions
[ https://issues.apache.org/jira/browse/FLINK-8953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
xueyu reassigned FLINK-8953:
----------------------------
Assignee: xueyu
> 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: xueyu
> 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)