weijietong commented on a change in pull request #1504: DRILL-6792: Find the
right probe side fragment wrapper & fix DrillBuf…
URL: https://github.com/apache/drill/pull/1504#discussion_r226813405
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/work/filter/RuntimeFilterRouter.java
##########
@@ -303,10 +332,28 @@ private Wrapper findPhysicalOpContainer(Wrapper wrapper,
PhysicalOperator op) {
return opContainer;
}
}
- //should not be here
- throw new IllegalStateException(String.format("No valid Wrapper found for
physicalOperator with id=%d", op.getOperatorId()));
+ return null;
+ }
+
+ private Wrapper findRuntimeFilterContainer(Wrapper wrapper, long
runtimeFilterIdentifier) {
+ boolean contain = containsRuntimeFilterPhysicalOperator(wrapper,
runtimeFilterIdentifier);
+ if (contain) {
+ return wrapper;
+ }
+ List<Wrapper> dependencies = wrapper.getFragmentDependencies();
+ if (CollectionUtils.isEmpty(dependencies)) {
+ return null;
+ }
+ for (Wrapper dependencyWrapper : dependencies) {
+ Wrapper opContainer = findRuntimeFilterContainer(dependencyWrapper,
runtimeFilterIdentifier);
+ if (opContainer != null) {
+ return opContainer;
+ }
+ }
+ return null;
Review comment:
make sense.
----------------------------------------------------------------
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]
With regards,
Apache Git Services