xwm1992 commented on PR #4578:
URL: https://github.com/apache/eventmesh/pull/4578#issuecomment-1826664440

   > 
https://github.com/apache/eventmesh/blob/de382181190423812138a86a54f02ed7b3da40ef/eventmesh-filter/src/main/java/org/apache/eventmesh/filter/patternbuild/PatternBuilder.java#L77-L91
   > 
   > I'm not sure if I'm misunderstanding something, but I think there's a 
duplicate PatternEntry in the Pattern. For example, the key is "source" and the 
value is the following array.
   > 
   > ```
   > String condition = "{
   >     "source":[
   >         {
   >             "prefix":"eventmesh."
   >         },
   >                            {
   >             "suffix":"eventmesh."
   >         },
   >     ]
   > }";
   > ```
   > 
   > In line 77, a PatternEntry is created. In lines 82-89, another 
PatternEntry is created that is identical to the first one. Both are added to 
the requiredFieldList of the Pattern.
   > 
   > 
上面这段代码我不确定是不是我哪里理解错了,感觉在Pattern里面构建了重复的PatternEntry。我以以下规则为例,key是"source",value是后面的数组。
   > 
   > ```
   > String condition = "{
   >     "source":[
   >         {
   >             "prefix":"eventmesh."
   >         },
   >                            {
   >             "suffix":"eventmesh."
   >         },
   >     ]
   > }";
   > ```
   > 
   > 
第77行代码,构建了一次PatternEntry。第82-89行代码,又构建了一次和前面一样的PatternEntry,都添加到了Pattern的requiredFieldList中。
   
   yes, you are right, I'll fix it.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to