You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/03/13 15:39:58 UTC

[GitHub] [calcite] vlsi opened a new pull request #2372: Add Matcher#matches to ForbiddenApis to avoid its accidental use

vlsi opened a new pull request #2372:
URL: https://github.com/apache/calcite/pull/2372


   Matcher#matches is only needed when implementing new Matcher implementations
   which is very rare.
   
   The common test pitfall is
   assertThat(contains(actual).matches(expected), is(true))
   
   It should better be written as
   assertThat(actual, contains(expected))


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [calcite] vlsi commented on pull request #2372: Add Matcher#matches to ForbiddenApis to avoid its accidental use

Posted by GitBox <gi...@apache.org>.
vlsi commented on pull request #2372:
URL: https://github.com/apache/calcite/pull/2372#issuecomment-798529619


   /cc @xy2953396112 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [calcite] vlsi merged pull request #2372: Add Matcher#matches to ForbiddenApis to avoid its accidental use

Posted by GitBox <gi...@apache.org>.
vlsi merged pull request #2372:
URL: https://github.com/apache/calcite/pull/2372


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [calcite] xy2953396112 commented on a change in pull request #2372: Add Matcher#matches to ForbiddenApis to avoid its accidental use

Posted by GitBox <gi...@apache.org>.
xy2953396112 commented on a change in pull request #2372:
URL: https://github.com/apache/calcite/pull/2372#discussion_r593853455



##########
File path: core/src/test/java/org/apache/calcite/test/AbstractMaterializedViewTest.java
##########
@@ -76,8 +77,9 @@
   protected Function<String, Boolean> resultContains(
       final String... expected) {
     return s -> {
+      String sLinux = Util.toLinux(s);
       for (String st : expected) {
-        if (!Matchers.containsStringLinux(st).matches(s)) {
+        if (!sLinux.contains(Util.toLinux(st))) {

Review comment:
       thanks, LGTM~
   




----------------------------------------------------------------
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:
users@infra.apache.org