[ 
https://issues.apache.org/jira/browse/BEAM-8468?focusedWorklogId=335309&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-335309
 ]

ASF GitHub Bot logged work on BEAM-8468:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Oct/19 00:48
            Start Date: 29/Oct/19 00:48
    Worklog Time Spent: 10m 
      Work Description: 11moon11 commented on pull request #9863: [BEAM-8468] 
Predicate push down for in memory table
URL: https://github.com/apache/beam/pull/9863#discussion_r339853629
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rule/BeamIOPushDownRule.java
 ##########
 @@ -88,37 +86,66 @@ public void onMatch(RelOptRuleCall call) {
     final Pair<ImmutableList<RexNode>, ImmutableList<RexNode>> projectFilter = 
program.split();
     final RelDataType calcInputRowType = program.getInputRowType();
 
+    final BeamSqlTableFilter tableFilter = 
beamSqlTable.constructFilter(projectFilter.right);
+    if (!beamSqlTable.supportsProjects() && tableFilter instanceof 
DefaultTableFilter) {
+      // Either project or filter push-down must be supported by the IO.
+      return;
+    }
+
+    if (!(tableFilter instanceof DefaultTableFilter) && 
!beamSqlTable.supportsProjects()) {
+      // Filter push-down without project push-down is not supported for now.
 
 Review comment:
   Created a JIRA: https://jira.apache.org/jira/browse/BEAM-8508.
   Added a TODO.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 335309)
    Time Spent: 1h  (was: 50m)

> Add predicate/filter push-down capability to IO APIs
> ----------------------------------------------------
>
>                 Key: BEAM-8468
>                 URL: https://issues.apache.org/jira/browse/BEAM-8468
>             Project: Beam
>          Issue Type: New Feature
>          Components: dsl-sql
>            Reporter: Kirill Kozlov
>            Assignee: Kirill Kozlov
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> * InMemoryTable should implement a following methods:
> {code:java}
> public PCollection<Row> buildIOReader(
>     PBegin begin, BeamSqlTableFilter filters, List<String> fieldNames);
> public BeamSqlTableFilter constructFilter(List<RexNode> filter);
> {code}
>  * Update a push-down rule to support predicate/filter push-down.
>  * Create a class
> {code:java}
> class TestTableFilter implements BeamSqlTableFilter{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to