Skip to content

Commit

Permalink
chore: make like operator query to be case insensitive (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
saxenakshitiz authored Nov 7, 2022
1 parent a8498e6 commit 38dcb3f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class DefaultColumnRequestConverter implements ColumnRequestConverter {

private static final String QUESTION_MARK = "?";
private static final String REGEX_OPERATOR = "~";
private static final String REGEX_OPERATOR = "~*";
private static final int MAP_KEY_INDEX = 0;
private static final int MAP_VALUE_INDEX = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ void testQueryWithLikeOperator() {
+ " = '"
+ TENANT_ID
+ "' "
+ "AND span_name ~ '%test%'",
+ "AND span_name ~* '%test%'",
tableDefinition,
executionContext);
}
Expand Down Expand Up @@ -643,7 +643,7 @@ void testQueryWithContainsKeyLikeOperator() {
+ " = '"
+ TENANT_ID
+ "' "
+ "AND tags::jsonb::text ~ '.*\"my_tag_name.*\":.*'",
+ "AND tags::jsonb::text ~* '.*\"my_tag_name.*\":.*'",
tableDefinition,
executionContext);
}
Expand Down Expand Up @@ -1047,7 +1047,7 @@ void testQueryWithLongColumnWithLikeFilter() {
+ " = '"
+ TENANT_ID
+ "' "
+ "AND duration_millis ~ 5000",
+ "AND duration_millis ~* 5000",
tableDefinition,
executionContext);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public static QueryRequest buildTagsContainsKeyLikeQuery() {
builder.addSelection(serviceName);

Filter filter =
createFilter("SERVICE.tags", Operator.CONTAINS_KEY_LIKE, ValueType.STRING, "key5.*");
createFilter("SERVICE.tags", Operator.CONTAINS_KEY_LIKE, ValueType.STRING, "KEY5.*");

builder.setFilter(filter);

Expand Down

0 comments on commit 38dcb3f

Please sign in to comment.