[ https://issues.apache.org/jira/browse/BEAM-8365?focusedWorklogId=328106&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-328106 ]
ASF GitHub Bot logged work on BEAM-8365: ---------------------------------------- Author: ASF GitHub Bot Created on: 14/Oct/19 20:15 Start Date: 14/Oct/19 20:15 Worklog Time Spent: 10m Work Description: 11moon11 commented on pull request #9764: [BEAM-8365] [WIP] Project push-down for TestTableProvider URL: https://github.com/apache/beam/pull/9764#discussion_r334645199 ########## File path: sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/test/TestTableProvider.java ########## @@ -150,12 +165,40 @@ public BeamTableStatistics getTableStatistics(PipelineOptions options) { return begin.apply(Create.of(tableWithRows.rows).withCoder(rowCoder())); } + @Override + public PCollection<Row> buildIOReader( + PBegin begin, BeamSqlTableFilter filters, List<String> fieldNames) { + PCollection<Row> withAllFields = buildIOReader(begin); + if (options == PushDownOptions.NONE + || (fieldNames.isEmpty() && filters instanceof DefaultTableFilter)) { + return withAllFields; + } Review comment: Moved the default case to `Transform#expand`. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 328106) Time Spent: 3h 40m (was: 3.5h) > Add project push-down capability to IO APIs > ------------------------------------------- > > Key: BEAM-8365 > URL: https://issues.apache.org/jira/browse/BEAM-8365 > Project: Beam > Issue Type: New Feature > Components: dsl-sql > Reporter: Kirill Kozlov > Assignee: Kirill Kozlov > Priority: Major > Time Spent: 3h 40m > Remaining Estimate: 0h > > * InMemoryTable should implement a following method: > {code:java} > public PCollection<Row> buildIOReader( > PBegin begin, BeamSqlTableFilter filters, List<String> fieldNames);{code} > Which should return a `PCollection` with fields specified in `fieldNames` > list. > * Create a rule to push fields used by a Calc (in projects and in a > condition) down into TestTable IO. > * Updating that same Calc (from previous step) to have a proper input and > output schemes, remove unused fields. -- This message was sent by Atlassian Jira (v8.3.4#803005)