lct45 commented on a change in pull request #9582:
URL: https://github.com/apache/kafka/pull/9582#discussion_r523044318



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java
##########
@@ -410,18 +410,6 @@ public final void addSource(final Topology.AutoOffsetReset 
offsetReset,
             }
         }
 
-        for (final Pattern otherPattern : earliestResetPatterns) {
-            if (topicPattern.pattern().contains(otherPattern.pattern()) || 
otherPattern.pattern().contains(topicPattern.pattern())) {
-                throw new TopologyException("Pattern " + topicPattern + " will 
overlap with another pattern " + otherPattern + " already been registered by 
another source");
-            }
-        }
-
-        for (final Pattern otherPattern : latestResetPatterns) {
-            if (topicPattern.pattern().contains(otherPattern.pattern()) || 
otherPattern.pattern().contains(topicPattern.pattern())) {
-                throw new TopologyException("Pattern " + topicPattern + " will 
overlap with another pattern " + otherPattern + " already been registered by 
another source");
-            }
-        }
-

Review comment:
       I might _also_ be missing something, but what's the scenario where one 
pattern is a substring of another and they _dont_ match the same topics? If you 
take Bruno's example from earlier of `topic*` and `topi*`, `topi*` would be 
considered a substring of `topic*` and they would both match `topic A`, right? 
I guess the other scenario is if we have a topic `topia A`, that would match 
`topi*` and not `topic*`. So I guess it seems like it isn't always true that 
they'll overlap, but we would want to check if they do, right?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to