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-4565) Support for SQL IN operator
Date Fri, 10 Mar 2017 13:44:05 GMT

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

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

GitHub user DmytroShkvyra reopened a pull request:

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

    [FLINK-4565] Support for SQL IN operator

    [FLINK-4565] Support for SQL IN operator
    This PR is a part of work on SQL IN operator in Table API, which implements IN for literals.
    Two cases are covered: less and great then 20 literals.
    
    Also I have some questions:
    - converting all numeric types to BigDecimal isn't ok? I decided to make so to simplify
use of hashset.
    - validation isn't really good. It forces to use operator with same type literals. Should
I rework it or maybe just add more cases?
    expressionDsl.scala:
    entry point for IN operator in scala API
    ScalarOperators.scala:
    1) All numeric types are upcasting to BigDecimal for using in hashset, other types are
unchanged in castNumeric
    2) valuesInitialization used for 2 cases: when we have more then 20 operands (then we
use hashset, initialized in constructor, descibed below) and less then 20 operands (then we
initialize operands in method's body and use them in conjunction)
    3) comparison also covers described above cases. In first case we use callback to declare
and initialize hashset with all operands. Otherwise we just put all operands in conjunction.
    4) Final code is built up with these code snippets.
    CodeGenerator.scala:
    passes arguments and callback to declare and init hashet
    FunctionCatalog.scala:
    registers "in" as method
    InITCase:
    some use cases

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

    $ git pull https://github.com/DmytroShkvyra/flink FLINK-4565-NV

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

    https://github.com/apache/flink/pull/3502.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 #3502
    
----
commit f7960d66a0f885a5b032345427c5380f268cc60e
Author: DmytroShkvyra <dshkvyra@gmail.com>
Date:   2017-03-09T19:37:46Z

    [FLINK-4565] Support for SQL IN operator

commit 6a457b404a3677f490728390a12f7045a06853e8
Author: DmytroShkvyra <dshkvyra@gmail.com>
Date:   2017-03-10T08:07:17Z

    [FLINK-4565] Add "NOT IN" case to InITCase.scala

commit 3cc7a3f79a0a37e52ba3118fb1b33e1eb190e9d9
Author: DmytroShkvyra <dshkvyra@gmail.com>
Date:   2017-03-10T08:37:28Z

    [FLINK-4565] Removed unnecessary test case

commit 230b02c9e5967da16f4a5694bf36d247c59ed4b4
Author: DmytroShkvyra <dshkvyra@gmail.com>
Date:   2017-03-10T11:23:23Z

    [FLINK-4565] Fix tests dataset

----


> Support for SQL IN operator
> ---------------------------
>
>                 Key: FLINK-4565
>                 URL: https://issues.apache.org/jira/browse/FLINK-4565
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Dmytro Shkvyra
>
> It seems that Flink SQL supports the uncorrelated sub-query IN operator. But it should
also be available in the Table API and tested.



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

Mime
View raw message