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-6334) Refactoring UDTF interface
Date Mon, 01 May 2017 21:19:05 GMT

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

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_r114204295
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/TableFunctionConversions.scala
---
    @@ -0,0 +1,56 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.table.api.scala
    +
    +import org.apache.flink.api.common.typeinfo.TypeInformation
    +import org.apache.flink.table.api.Table
    +import org.apache.flink.table.expressions._
    +import org.apache.flink.table.functions.TableFunction
    +import org.apache.flink.table.plan.logical.LogicalTableFunctionCall
    +
    +/**
    +  * Holds methods to convert a [[TableFunction]] (provided by scala user) into a [[Table]]
    +  *
    +  * @param tf The tableFunction to convert.
    +  */
    +class TableFunctionConversions[T](tf: TableFunction[T]) {
    +
    --- End diff --
    
    I think the name `TableFunctionConversions` is OK. A `TableFunction` object is implicitly
converted into a `TableFunctionConversions` and the `apply` method converts it into a `Table`.


> 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
>
> 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)

Mime
View raw message