Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/240#discussion_r145811793 --- Diff: extras/rya.pcj.fluo/pcj.fluo.app/src/main/java/org/apache/rya/indexing/pcj/fluo/app/util/AggregationStateMetadataVisitor.java --- @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.rya.indexing.pcj.fluo.app.util; + +import static jline.internal.Preconditions.checkNotNull; + +import org.apache.rya.indexing.pcj.fluo.app.query.CommonNodeMetadataImpl; +import org.apache.rya.indexing.pcj.fluo.app.query.ConstructQueryMetadata; +import org.apache.rya.indexing.pcj.fluo.app.query.FilterMetadata; +import org.apache.rya.indexing.pcj.fluo.app.query.FluoQuery; +import org.apache.rya.indexing.pcj.fluo.app.query.JoinMetadata; +import org.apache.rya.indexing.pcj.fluo.app.query.PeriodicQueryMetadata; +import org.apache.rya.indexing.pcj.fluo.app.query.ProjectionMetadata; +import org.apache.rya.indexing.pcj.fluo.app.query.QueryMetadata; + +/** + * This builder visitor inserts the aggregation metadata into all of its + * ancestors. + */ +public class AggregationStateMetadataVisitor extends StopNodeVisitor { + + private CommonNodeMetadataImpl aggStateMeta; + + public AggregationStateMetadataVisitor(FluoQuery.Builder fluoQueryBuilder, String stopNodeId, CommonNodeMetadataImpl aggStateMeta) { + super(fluoQueryBuilder, stopNodeId); + this.aggStateMeta = checkNotNull(aggStateMeta); + } + + public void visit(QueryMetadata.Builder builder) { --- End diff -- Done
---