mosche commented on code in PR #25187:
URL: https://github.com/apache/beam/pull/25187#discussion_r1093358704
##########
runners/spark/3/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/PipelineTranslator.java:
##########
@@ -146,13 +165,37 @@ public String name() {
public @Nullable Dataset<WindowedValue<T>> dataset() {
return dataset;
}
+
+ private boolean isLeaf() {
+ return dependentTransforms.isEmpty();
+ }
+
+ private int usages() {
+ return dependentTransforms.size();
+ }
+
+ private void resetPlanComplexity() {
+ planComplexity = 1;
+ }
+
+ /** Estimate complexity of query plan by multiplying complexities of all
dependencies. */
+ private float estimatePlanComplexity() {
+ if (planComplexity > 0) {
+ return planComplexity;
+ }
+ float complexity = 1 + complexityFactor;
+ for (TranslationResult<?> res : dependencies) {
Review Comment:
👍
--
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]