tenthe commented on code in PR #1994: URL: https://github.com/apache/streampipes/pull/1994#discussion_r1346275367
########## streampipes-connect-shared/src/main/java/org/apache/streampipes/connect/shared/preprocessing/generator/StatefulTransformationRuleGeneratorVisitor.java: ########## @@ -0,0 +1,99 @@ +/* + * 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.streampipes.connect.shared.preprocessing.generator; + +import org.apache.streampipes.connect.shared.preprocessing.transform.stream.DuplicateFilterPipelineElement; +import org.apache.streampipes.connect.shared.preprocessing.transform.stream.EventRateTransformationRule; +import org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription; +import org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription; +import org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription; +import org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription; +import org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription; +import org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription; +import org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription; +import org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription; +import org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription; +import org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription; +import org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription; +import org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription; + +public class StatefulTransformationRuleGeneratorVisitor extends TransformationRuleGeneratorVisitor { + + @Override + public void visit(CreateNestedRuleDescription rule) { + Review Comment: Is there a reason why all the visit methods are emtpy? ########## streampipes-model/src/main/java/org/apache/streampipes/model/connect/rules/value/AddTimestampRuleDescription.java: ########## @@ -42,4 +44,14 @@ public String getRuntimeKey() { public void setRuntimeKey(String runtimeKey) { this.runtimeKey = runtimeKey; } + + @Override + public void accept(ITransformationRuleVisitor visitor) { + visitor.visit(this); + } + + @Override + public int getRulePriority() { + return 100; Review Comment: If this is not possible, I would suggest that we add a small explanation somewhere in the JavaDoc (e.g. at the interface) that briefly explains the concept of rulePriority. ########## streampipes-connect-shared/src/main/java/org/apache/streampipes/connect/shared/preprocessing/utils/ConversionUtils.java: ########## Review Comment: Can we make the methods in this class none static? This is currently not critical, but if we change this, the clients that use the class should be easier to test. This comment also applies to the other Helper and Utils classes. We can also have a discussion about this. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
