flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6196) Support dynamic schema in Table Function
Date Fri, 21 Apr 2017 13:04:04 GMT

    [ https://issues.apache.org/jira/browse/FLINK-6196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978696#comment-15978696
] 

ASF GitHub Bot commented on FLINK-6196:
---------------------------------------

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3623#discussion_r112675413
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/TableFunction.scala
---
    @@ -131,8 +129,16 @@ abstract class TableFunction[T] extends UserDefinedFunction {
         * method. Flink's type extraction facilities can handle basic types or
         * simple POJOs but might be wrong for more complex, custom, or composite types.
         *
    +    * The input arguments are the input arguments which are passed to the eval() method.
    +    * Only the literal arguments (constant values) are passed to the [[getResultType()]]
method.
    +    * If non-literal arguments appear, it will pass nulls instead.
    +    *
    +    * @param arguments arguments of a function call (only literal arguments
    +    *                  are passed, nulls for non-literal ones)
    +    * @param classes The type classes of the parameters.
         * @return [[TypeInformation]] of result type or null if Flink should determine the
type
         */
    -  def getResultType: TypeInformation[T] = null
    +  def getResultType(arguments: java.util.List[AnyRef],
    +                    classes: java.util.List[Class[_]]): TypeInformation[T] = null
    --- End diff --
    
    rename `classes` to `argTypes`?


> Support dynamic schema in Table Function
> ----------------------------------------
>
>                 Key: FLINK-6196
>                 URL: https://issues.apache.org/jira/browse/FLINK-6196
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: Zhuoluo Yang
>            Assignee: Zhuoluo Yang
>
> In many of our use cases. We have to decide the schema of a UDTF at the run time. For
example. udtf('c1, c2, c3') will generate three columns for a lateral view. 
> Most systems such as calcite and hive support this feature. However, the current implementation
of flink didn't implement the feature correctly.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message