shounakmk219 commented on PR #12856: URL: https://github.com/apache/pinot/pull/12856#issuecomment-2046641801
> > It also replaces *? with * for custom metric rules as the surrounding pattern matching is well defined. > > Can you please elaborate more on this? Maybe you can use an example to explain why it is needed? @zhtaoxiang As @Jackie-Jiang pointed out in point 3 [here](https://github.com/apache/pinot/pull/12739#discussion_r1554045076), Let's say a metric is of the format `somePrefix.tableName.someMetric` Case 1 using `*?` : pattern = `somePrefix\\.([^.]*?)\\.someMetric` The parser will do conservative iterations of 1 . `somePrefix.t` -> fails as `.` is not encountered after it 2 . `somePrefix.ta` -> fails as `.` is not encountered after it . . n . `somePrefix.tableName` -> success as `.` is encountered after it Case 1 using `*` : pattern = `somePrefix\\.([^.]*)\\.someMetric` The parser will match `somePrefix.tableName` in the first iteration itself as its greedy and only breaks at the `.` in `.someMetric` -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org