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

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

GitHub user KurtYoung opened a pull request:

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

    [FLINK-3849] [table] Add FilterableTableSource interface and rules for 
pushing it

    This PR is based on #3166 , and added following changes:
    
    1. Refactor `RexProgramExpressionExtractor` and 
`RexProgramExpressionExtractor` to `RexProgramExtractor` and 
`RexProgramRewriter`. `RexProgramExtractor` is responsible for retract either 
projection expressions or filter expression.
    2. Make sure we don't fail during extracting and converting filter RexNodes 
to expressions. The expressions which successfully translated and unconverted 
RexNodes will both be returned.
    3. Add some tests for `RexProgramExtractor`.
    4. Provide unified `PushFilterIntoTableSourceScanRuleBase` to support 
filter push down in both batch and stream mode.
    5. Add some logical tests for filter push down in different situations, 
like fully push down and partial push down.
    5. Slight change of testing class `TestFilterableTableSource` to make it 
less specialized.

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

    $ git pull https://github.com/KurtYoung/flink flink-3849

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

    https://github.com/apache/flink/pull/3520.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 #3520
    
----
commit 0a7af41509d9a0db3e791cb9f4dc5a1a8086f0b2
Author: tonycox <anton_solo...@epam.com>
Date:   2017-01-11T09:15:49Z

    [FLINK-3849] Add FilterableTableSource interface and Rules for pushing it

commit 549b4e00e68d32f070e196fc6eb9a7f5f9e937c3
Author: tonycox <anton_solo...@epam.com>
Date:   2017-01-31T12:41:52Z

    fix filterable test

commit 9aa82062832e0aabcb003e582c8130aeecc91a73
Author: tonycox <anton_solo...@epam.com>
Date:   2017-02-16T13:32:33Z

    rebase and trying fix rexnode parsing

commit 646a6931224c7dcc58501ec014ab675925bb105d
Author: tonycox <anton_solo...@epam.com>
Date:   2017-02-17T16:48:40Z

    create wrapper and update rules

commit abfa38d894aa86b7a5c91dd29bf398b880c8bfe7
Author: Kurt Young <ykt...@gmail.com>
Date:   2017-03-13T07:30:13Z

    [FLINK-3849] [table] Add FilterableTableSource interface and rules for 
pushing it

----


> Add FilterableTableSource interface and translation rule
> --------------------------------------------------------
>
>                 Key: FLINK-3849
>                 URL: https://issues.apache.org/jira/browse/FLINK-3849
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Fabian Hueske
>            Assignee: Kurt Young
>
> Add a {{FilterableTableSource}} interface for {{TableSource}} implementations 
> which support filter push-down.
> The interface could look as follows
> {code}
> def trait FilterableTableSource {
>   // returns unsupported predicate expression
>   def setPredicate(predicate: Expression): Expression
> }
> {code}
> In addition we need Calcite rules to push a predicate (or parts of it) into a 
> TableScan that refers to a {{FilterableTableSource}}. We might need to tweak 
> the cost model as well to push the optimizer in the right direction.



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

Reply via email to