[
https://issues.apache.org/jira/browse/BEAM-8343?focusedWorklogId=325384&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-325384
]
ASF GitHub Bot logged work on BEAM-8343:
----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Oct/19 23:46
Start Date: 08/Oct/19 23:46
Worklog Time Spent: 10m
Work Description: 11moon11 commented on pull request #9731: [BEAM-8343]
Added nessesary methods to BeamSqlTable to enable support for predicate/project
push-down
URL: https://github.com/apache/beam/pull/9731#discussion_r332780266
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/BeamSqlTable.java
##########
@@ -17,22 +17,33 @@
*/
package org.apache.beam.sdk.extensions.sql.meta;
+import java.util.List;
import org.apache.beam.sdk.extensions.sql.impl.BeamTableStatistics;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.schemas.Schema;
import org.apache.beam.sdk.values.PBegin;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.POutput;
import org.apache.beam.sdk.values.Row;
+import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexNode;
/** This interface defines a Beam Sql Table. */
public interface BeamSqlTable {
/** create a {@code PCollection<Row>} from source. */
PCollection<Row> buildIOReader(PBegin begin);
+ /** create a {@code PCollection<Row>} from source with predicate and/or
project pushed-down. */
+ PCollection<Row> buildIOReader(PBegin begin, BeamSqlTableFilter filters,
List<String> fieldNames);
+
/** create a {@code IO.write()} instance to write to target. */
POutput buildIOWriter(PCollection<Row> input);
+ /** Generate an IO implementation of {@code BeamSqlTableFilter} for
predicate push-down. */
+ BeamSqlTableFilter constructFilter(List<RexNode> filter);
+
+ /** Whether project push-down is supported by the IO API. */
+ Boolean supportsProjects();
Review comment:
No, value should not be nullable, update to use `boolean` instead.
----------------------------------------------------------------
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: 325384)
Time Spent: 3h 40m (was: 3.5h)
> Add means for IO APIs to support predicate and/or project push-down when
> running SQL pipelines
> ----------------------------------------------------------------------------------------------
>
> Key: BEAM-8343
> URL: https://issues.apache.org/jira/browse/BEAM-8343
> Project: Beam
> Issue Type: New Feature
> Components: dsl-sql
> Reporter: Kirill Kozlov
> Assignee: Kirill Kozlov
> Priority: Major
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> The objective is to create a universal way for Beam SQL IO APIs to support
> predicate/project push-down.
> A proposed way to achieve that is by introducing an interface responsible
> for identifying what portion(s) of a Calc can be moved down to IO layer.
> Also, adding following methods to a BeamSqlTable interface to pass necessary
> parameters to IO APIs:
> - BeamSqlTableFilter supportsFilter(RexProgram program, RexNode filter)
> - Boolean supportsProjects()
> - PCollection<Row> buildIOReader(PBegin begin, BeamSqlTableFilter filters,
> List<String> fieldNames)
>
> Design doc
> [link|https://docs.google.com/document/d/1-ysD7U7qF3MAmSfkbXZO_5PLJBevAL9bktlLCerd_jE/edit?usp=sharing].
--
This message was sent by Atlassian Jira
(v8.3.4#803005)