You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "tibrewalpratik17 (via GitHub)" <gi...@apache.org> on 2023/04/19 10:43:24 UTC

[GitHub] [pinot] tibrewalpratik17 opened a new pull request, #10646: Changing LIKE behaviour to case-sensitive and adding support for ILIKE

tibrewalpratik17 opened a new pull request, #10646:
URL: https://github.com/apache/pinot/pull/10646

   Label: `backward-incompatible` 
   
   As discussed in #10609, changing the behaviour of `LIKE` function to case-senstiive rather than the present case-insensitive nature. Also introduced a new function `ILIKE` which is equivalent to case-insensitive `LIKE`.


-- 
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-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] codecov-commenter commented on pull request #10646: Changing LIKE behaviour to case-sensitive and adding support for ILIKE

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10646:
URL: https://github.com/apache/pinot/pull/10646#issuecomment-1514562923

   ## [Codecov](https://codecov.io/gh/apache/pinot/pull/10646?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10646](https://codecov.io/gh/apache/pinot/pull/10646?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5434e11) into [master](https://codecov.io/gh/apache/pinot/commit/8dab8034cf588be5d4d6c92db55dbbf3ebc51f7f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8dab803) will **decrease** coverage by `56.42%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #10646       +/-   ##
   =============================================
   - Coverage     70.29%   13.87%   -56.42%     
   + Complexity     6503      439     -6064     
   =============================================
     Files          2105     2052       -53     
     Lines        113349   110910     -2439     
     Branches      17089    16795      -294     
   =============================================
   - Hits          79674    15386    -64288     
   - Misses        28091    94267    +66176     
   + Partials       5584     1257     -4327     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | integration1 | `?` | |
   | integration2 | `?` | |
   | unittests1 | `?` | |
   | unittests2 | `13.87% <0.00%> (+0.02%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pinot/pull/10646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../pinot/common/function/scalar/StringFunctions.java](https://codecov.io/gh/apache/pinot/pull/10646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vZnVuY3Rpb24vc2NhbGFyL1N0cmluZ0Z1bmN0aW9ucy5qYXZh) | `0.00% <0.00%> (-78.95%)` | :arrow_down: |
   | [...ot/common/request/context/RequestContextUtils.java](https://codecov.io/gh/apache/pinot/pull/10646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vcmVxdWVzdC9jb250ZXh0L1JlcXVlc3RDb250ZXh0VXRpbHMuamF2YQ==) | `0.00% <0.00%> (-65.15%)` | :arrow_down: |
   | [...request/context/predicate/RegexpLikePredicate.java](https://codecov.io/gh/apache/pinot/pull/10646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vcmVxdWVzdC9jb250ZXh0L3ByZWRpY2F0ZS9SZWdleHBMaWtlUHJlZGljYXRlLmphdmE=) | `0.00% <0.00%> (-64.71%)` | :arrow_down: |
   
   ... and [1661 files with indirect coverage changes](https://codecov.io/gh/apache/pinot/pull/10646/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] ankitsultana commented on pull request #10646: Changing LIKE behaviour to case-sensitive and adding support for ILIKE

Posted by "ankitsultana (via GitHub)" <gi...@apache.org>.
ankitsultana commented on PR #10646:
URL: https://github.com/apache/pinot/pull/10646#issuecomment-1517106330

   +1 to Jackie's comment. I think we don't know the path forward here.


-- 
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-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] tibrewalpratik17 commented on pull request #10646: Changing LIKE behaviour to case-sensitive and adding support for ILIKE

Posted by "tibrewalpratik17 (via GitHub)" <gi...@apache.org>.
tibrewalpratik17 commented on PR #10646:
URL: https://github.com/apache/pinot/pull/10646#issuecomment-1517966890

   @Jackie-Jiang @ankitsultana i think we are pretty sure that we want to change the behaviour of `LIKE` to case-sensitive from current case-insensitivity. Then should we just incorporate that change in this patch and continue the discussion of `ILIKE` in #10609?
   


-- 
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-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] siddharthteotia commented on pull request #10646: Changing LIKE behaviour to case-sensitive and adding support for ILIKE

Posted by "siddharthteotia (via GitHub)" <gi...@apache.org>.
siddharthteotia commented on PR #10646:
URL: https://github.com/apache/pinot/pull/10646#issuecomment-1520192324

   I will take a look at this and corresponding issue discussion today.


-- 
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-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #10646: Changing LIKE behaviour to case-sensitive and adding support for ILIKE

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #10646:
URL: https://github.com/apache/pinot/pull/10646#discussion_r1171954741


##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/RequestContextUtils.java:
##########
@@ -205,7 +205,7 @@ public static FilterContext getFilter(Function thriftFunction) {
       case LIKE:
         return new FilterContext(FilterContext.Type.PREDICATE, null,
             new RegexpLikePredicate(getExpression(operands.get(0)),
-                RegexpPatternConverterUtils.likeToRegexpLike(getStringValue(operands.get(1)))));
+                RegexpPatternConverterUtils.likeToRegexpLike(getStringValue(operands.get(1))), ""));

Review Comment:
   This is not the correct fix because we don't really handle the `ILIKE` key word



##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/StringFunctions.java:
##########
@@ -751,15 +751,41 @@ public static String regexpReplace(String inputStr, String matchStr, String repl
     return regexpReplace(inputStr, matchStr, replaceStr, matchStartPos, occurence, "");
   }
 
+  @ScalarFunction(names = {"regexpLike", "regexp_like"})
+  public static boolean regexpLike(String inputStr, String regexPatternStr, String flag) {

Review Comment:
   Any specific reason why we pass in a string flag instead of a boolean `caseInsensitive`?



-- 
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-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org