[
https://issues.apache.org/jira/browse/FLINK-6334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995244#comment-15995244
]
ASF GitHub Bot commented on FLINK-6334:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3791#discussion_r114590134
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/table.scala
---
@@ -93,6 +103,11 @@ class Table(
* }}}
*/
def select(fields: Expression*): Table = {
+ if (UserDefinedFunctionUtils.verifyTableFunctionCallExistence(this)) {
--- End diff --
I think we can add these checks without touching all methods of `Table`.
We could implement a method that recursively traverses a `LogicalNode` and
checks if one of this children is an unbounded table function call. This check
is performed in the constructor of Table and throws an exception except, the
`logicalNode` itself is a `LogicalTableFunctionCall` (this is the case if it
was created with the new constructor or `as()` was applied on it.
That way we can remove all checks in the methods.
> Refactoring UDTF interface
> --------------------------
>
> Key: FLINK-6334
> URL: https://issues.apache.org/jira/browse/FLINK-6334
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: Ruidong Li
> Assignee: Ruidong Li
> Priority: Blocker
> Fix For: 1.3.0
>
>
> The current UDTF leverages the table.join(expression) interface, which is not
> a proper interface in terms of semantics. We would like to refactor this to
> let UDTF use table.join(table) interface. Very briefly, UDTF's apply method
> will return a Table Type, so Join(UDTF('a, 'b, ...) as 'c) shall be viewed as
> join(Table)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)