[
https://issues.apache.org/jira/browse/BEAM-4461?focusedWorklogId=160699&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-160699
]
ASF GitHub Bot logged work on BEAM-4461:
----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Oct/18 16:07
Start Date: 30/Oct/18 16:07
Worklog Time Spent: 10m
Work Description: akedin commented on a change in pull request #6883:
[BEAM-4461] Resubmit PR to switch SQL over to schema transfomr
URL: https://github.com/apache/beam/pull/6883#discussion_r229367157
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamAggregationRel.java
##########
@@ -118,58 +114,51 @@ public RelWriter explainTerms(RelWriter pw) {
@Override
public PTransform<PCollectionList<Row>, PCollection<Row>> buildPTransform() {
- Schema inputSchema = CalciteUtils.toSchema(getInput().getRowType());
Schema outputSchema = CalciteUtils.toSchema(getRowType());
- List<AggregationCombineFnAdapter> aggregationAdapters =
+ List<FieldAggregation> aggregationAdapters =
getNamedAggCalls()
.stream()
- .map(aggCall -> AggregationCombineFnAdapter.of(aggCall,
inputSchema))
+ .map(aggCall -> new FieldAggregation(aggCall.getKey(),
aggCall.getValue()))
.collect(toList());
return new Transform(
- windowFn, windowFieldIndex, inputSchema, getGroupSet(),
aggregationAdapters, outputSchema);
+ windowFn, windowFieldIndex, getGroupSet(), aggregationAdapters,
outputSchema);
+ }
+
+ private static class FieldAggregation implements Serializable {
+ final List<Integer> inputs;
+ final CombineFn combineFn;
+ final Field outputField;
Review comment:
nit: why these fields don't belong to `AggregationCombineFnAdapter`?
`FieldAggregation` is just a pass-through class at the moment
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 160699)
Time Spent: 15h 40m (was: 15.5h)
> Create a library of useful transforms that use schemas
> ------------------------------------------------------
>
> Key: BEAM-4461
> URL: https://issues.apache.org/jira/browse/BEAM-4461
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-java-core
> Reporter: Reuven Lax
> Assignee: Reuven Lax
> Priority: Major
> Time Spent: 15h 40m
> Remaining Estimate: 0h
>
> e.g. JoinBy(fields). Project, Filter, etc.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)