You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by clarkyzl <gi...@git.apache.org> on 2017/02/24 08:37:45 UTC

[GitHub] flink pull request #3407: [FLINK-5882] [table] TableFunction (UDTF) should s...

GitHub user clarkyzl opened a pull request:

    https://github.com/apache/flink/pull/3407

    [FLINK-5882] [table] TableFunction (UDTF) should support variable types and variable arguments

    Type: New Feature
    Priority: Major
    Components: table, udtf, TableFunction
    Problem Definition: TableFunction (UDTF) should support variable types and variable arguments
    Design:
    1. This pull request is based on FLINK-5881
    2. The only modification is on TableFunctionCallGen, and this part is similar with ScalarFunctionCallGen. It will make the the code generator accept the variable arguments without losing any part of it.
    3. add some tests, both stream and dataset.
    
    Impact Analysis: The only modification locates in TableFunctionCallGen. The orther part is based on FLINK-5881.
    Test: Unit tests done.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/clarkyzl/flink flink-5882

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3407.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3407
    
----
commit 9af14d2be30edc5a3226ee60f218757ae029de21
Author: Zhuoluo Yang <zh...@alibaba-inc.com>
Date:   2017-02-22T10:53:34Z

    [FLINK-5881] [table] ScalarFunction(UDF) should support variable types and variable arguments

commit e5b85bec9a7becdfacef766660599cd1a4ea4c5d
Author: Zhuoluo Yang <zh...@alibaba-inc.com>
Date:   2017-02-23T11:29:37Z

    [FLINK-5881] [table] Modification as reviews

commit df4eab12d7657e971a2e6e72e0d1bd80a98ea8b0
Author: Zhuoluo Yang <zh...@alibaba-inc.com>
Date:   2017-02-24T08:17:50Z

    [FLINK-5882] [table] TableFunction (UDTF) should support variable types and variable arguments

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3407: [FLINK-5882] [table] TableFunction (UDTF) should support ...

Posted by clarkyzl <gi...@git.apache.org>.
Github user clarkyzl commented on the issue:

    https://github.com/apache/flink/pull/3407
  
    Hi @KurtYoung . Thanks for your reviewing. I've pushed another commit. This patch is based on https://github.com/apache/flink/pull/3389. If we can get https://github.com/apache/flink/pull/3389 merged first, this patch will look simpler. @twalthr , could you please take a look at https://github.com/apache/flink/pull/3389 ? Thank you all so much.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3407: [FLINK-5882] [table] TableFunction (UDTF) should support ...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/3407
  
    Thanks @clarkyzl. Looks good. Will merge...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3407: [FLINK-5882] [table] TableFunction (UDTF) should s...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/3407


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3407: [FLINK-5882] [table] TableFunction (UDTF) should support ...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/3407
  
    @clarkyzl I merged the varargs scalar functions. Can you rebase this and the Hive UDFs?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3407: [FLINK-5882] [table] TableFunction (UDTF) should s...

Posted by KurtYoung <gi...@git.apache.org>.
Github user KurtYoung commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3407#discussion_r104598155
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/TableFunctionCallGen.scala ---
    @@ -45,13 +45,23 @@ class TableFunctionCallGen(
           operands: Seq[GeneratedExpression])
         : GeneratedExpression = {
         // determine function signature
    -    val matchingSignature = getSignature(tableFunction, signature)
    +    val matchingMethod = getEvalMethod(tableFunction, signature)
           .getOrElse(throw new CodeGenException("No matching signature found."))
    +    val matchingSignature = matchingMethod.getParameterTypes
    +
    +    // zip for variable signatures
    +    var paramToOperands = matchingSignature.zip(operands)
    +    var i = paramToOperands.length
    +    while (i < operands.length
    --- End diff --
    
    I think this while loop can be replaced with `zipAll`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---