From 07326ef51eecb0b8ff66eca0635c951e8245a431 Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Thu, 30 Nov 2023 13:35:19 +0530 Subject: [PATCH 1/9] make inclause behaviour consistent between mongo and postgres --- .../core/documentstore/DocStoreTest.java | 3 +- .../postgres/utils/PostgresUtils.java | 67 ++++++++++++++++--- .../postgres/PostgresQueryParserTest.java | 32 ++++++++- 3 files changed, 89 insertions(+), 13 deletions(-) diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java index 38273c2e..8af6c15e 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java @@ -124,7 +124,8 @@ public static void shutdown() { @MethodSource private static Stream databaseContextProvider() { - return Stream.of(Arguments.of(MONGO_STORE), Arguments.of(POSTGRES_STORE)); + // return Stream.of(Arguments.of(MONGO_STORE), Arguments.of(POSTGRES_STORE)); + return Stream.of(Arguments.of(POSTGRES_STORE)); } @MethodSource diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java index 022d8237..cc9c032a 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java @@ -90,6 +90,10 @@ public static String prepareFieldDataAccessorExpr(String fieldName, String colum return fieldPrefix.toString(); } + private static boolean isFirstClassColumn(String fieldName) { + return OUTER_COLUMNS.contains(fieldName) || DOCUMENT_COLUMN.equals(fieldName); + } + public static Type getType(Object value) { boolean isArrayType = false; Type type = Type.STRING; @@ -180,12 +184,31 @@ public static String prepareParameterizedStringForJsonList( public static String parseNonCompositeFilterWithCasting( String fieldName, String columnName, String op, Object value, Builder paramsBuilder) { - String parsedExpression = - prepareCast(prepareFieldDataAccessorExpr(fieldName, columnName), value); + String parsedExpression = prepareFieldDataAccessorExpr(fieldName, columnName); + if (isInOp(op)) { + if (isFirstClassColumn(parsedExpression)) { + parsedExpression = "to_jsonb(" + parsedExpression + ")"; + } else { + parsedExpression = parsedExpression.replace("->>", "->"); + } + } else { + parsedExpression = prepareCast(parsedExpression, value); + } return parseNonCompositeFilter( fieldName, parsedExpression, columnName, op, value, paramsBuilder); } + private static boolean isInOp(String op) { + switch (op) { + case "IN": + case "NOT_IN": + case "NOT IN": + return true; + default: + return false; + } + } + @SuppressWarnings("unchecked") public static String parseNonCompositeFilter( String fieldName, @@ -198,6 +221,7 @@ public static String parseNonCompositeFilter( String sqlOperator; boolean isMultiValued = false; boolean isContainsOp = false; + boolean isInOP = false; switch (op) { case "EQ": case "=": @@ -250,18 +274,24 @@ public static String parseNonCompositeFilter( // so, we need - "document->key IS NULL OR document->key->> NOT IN (v1, v2)" StringBuilder notInFilterString = prepareFieldAccessorExpr(fieldName, columnName); if (!OUTER_COLUMNS.contains(fieldName)) { - filterString = notInFilterString.append(" IS NULL OR ").append(parsedExpression); + filterString = notInFilterString.append(" IS NULL OR"); } sqlOperator = " NOT IN "; isMultiValued = true; - value = prepareParameterizedStringForList((Iterable) value, paramsBuilder); + isInOP = true; + filterString + .append(" NOT ") + .append( + prepareFilterStringForInOperator( + parsedExpression, (Iterable) value, paramsBuilder)); break; case "IN": - // NOTE: both NOT_IN and IN filter currently limited to non-array field - // - https://github.com/hypertrace/document-store/issues/32#issuecomment-781411676 sqlOperator = " IN "; isMultiValued = true; - value = prepareParameterizedStringForList((Iterable) value, paramsBuilder); + isInOP = true; + filterString = + prepareFilterStringForInOperator( + parsedExpression, (Iterable) value, paramsBuilder); break; case "NOT_EXISTS": case "NOT EXISTS": @@ -336,8 +366,10 @@ public static String parseNonCompositeFilter( throw new UnsupportedOperationException(UNSUPPORTED_QUERY_OPERATION); } - filterString.append(sqlOperator); - if (value != null) { + if (!isInOP) { + filterString.append(sqlOperator); + } + if (value != null && !isInOP) { if (isMultiValued) { filterString.append(value); } else if (isContainsOp) { @@ -352,6 +384,23 @@ public static String parseNonCompositeFilter( return filterString.toString(); } + private static StringBuilder prepareFilterStringForInOperator( + final String parsedExpression, final Iterable values, final Builder paramsBuilder) { + final StringBuilder filterStringBuilder = new StringBuilder(); + filterStringBuilder.append("("); + final String collect = + StreamSupport.stream(values.spliterator(), false) + .map( + val -> { + paramsBuilder.addObjectParam(val); + return parsedExpression + " ?? ?"; + }) + .collect(Collectors.joining(" OR ")); + filterStringBuilder.append(collect); + filterStringBuilder.append(")"); + return filterStringBuilder; + } + private static Object prepareJsonValueForContainsOp(final Object value) { if (value instanceof Document) { try { diff --git a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java index c0e37765..fe1f33ce 100644 --- a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java +++ b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java @@ -110,7 +110,19 @@ void testParseNonCompositeFilter() { filter.getOp().toString(), filter.getValue(), initParams()); - Assertions.assertEquals(ID + " IN (?, ?)", query); + Assertions.assertEquals("(to_jsonb(" + ID + ") ?? ? OR to_jsonb(" + ID + ") ?? ?)", query); + } + + { + Filter filter = new Filter(Filter.Op.IN, ID, List.of("abc")); + String query = + PostgresUtils.parseNonCompositeFilterWithCasting( + filter.getFieldName(), + PostgresUtils.DOCUMENT_COLUMN, + filter.getOp().toString(), + filter.getValue(), + initParams()); + Assertions.assertEquals("(to_jsonb(" + ID + ") ?? ?)", query); } } @@ -158,16 +170,30 @@ void testParseNonCompositeFilterForJsonField() { Assertions.assertEquals("document->>'key1' ~* ?", query); } + { + Filter filter = new Filter(Filter.Op.IN, "key1", List.of("abc")); + String query = PostgresQueryParser.parseFilter(filter, initParams()); + Assertions.assertEquals("(document->'key1' ?? ?)", query); + } + { Filter filter = new Filter(Filter.Op.IN, "key1", List.of("abc", "xyz")); String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals("document->>'key1' IN (?, ?)", query); + Assertions.assertEquals("(document->'key1' ?? ? OR document->'key1' ?? ?)", query); + } + + { + Filter filter = new Filter(Op.NOT_IN, "key1", List.of("abc")); + String query = PostgresQueryParser.parseFilter(filter, initParams()); + Assertions.assertEquals("document->'key1' IS NULL OR NOT (document->'key1' ?? ?)", query); } { Filter filter = new Filter(Op.NOT_IN, "key1", List.of("abc", "xyz")); String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals("document->'key1' IS NULL OR document->>'key1' NOT IN (?, ?)", query); + Assertions.assertEquals( + "document->'key1' IS NULL OR NOT (document->'key1' ?? ? OR document->'key1' ?? ?)", + query); } { From 78384313441ae428d72fb0b64fe046a9ccc02677 Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Thu, 30 Nov 2023 13:37:11 +0530 Subject: [PATCH 2/9] spotless --- .../1a9bdbfaccb9672e42866cddd17df4f64d68fbad | 3 + .../2561871d99d8992bf90d0882349a013391cf0715 | 5 + .../36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b | 0 .../3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c | 9 + .../4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 | 22 + .../6b7749b677774a72e32ce7b9c682307ace86b109 | 9 + .../808dbf2dad3b587591c985b04f47edef3aa70f39 | 0 .../892f9aabd92368a512b67dfa0f13a3c680de2bc9 | 0 .../8c4f975c761608a98ae79efe6ffc3345c1391bc4 | 0 .../93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 | 5 + .../a1288cdc106e20724b8729bee339d7fa78a9096f | 5 + .../a73cae39c74764efaf08d760ed3e5a42aea37ca2 | 7 + .../b46ca719b34162ed593babf2bae7216774cbf02e | 77 +++ .../bb9c38f9f1684753821ef3b801caeadc8c820f34 | 555 ++++++++++++++++++ .../bee4e4b944ea58987b2d54eb48db85ad115ea816 | 292 +++++++++ .../cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 | 0 .../cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 | 7 + .../d107e4c530045df456683e6f437cfe2843045178 | 0 .../d283e3b881e061fef91cc43c55bc7d85f6bb1a40 | 0 .../dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd | 101 ++++ .../f91503f99719558ba609448495d024217530b19e | 0 .../fb727c1802818d51fdf42b1d16818caa3dbe2b56 | 0 .idea/sonarlint/issuestore/index.pb | 45 ++ .../1a9bdbfaccb9672e42866cddd17df4f64d68fbad | 0 .../2561871d99d8992bf90d0882349a013391cf0715 | 0 .../36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b | 0 .../3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c | 0 .../4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 | 0 .../6b7749b677774a72e32ce7b9c682307ace86b109 | 0 .../808dbf2dad3b587591c985b04f47edef3aa70f39 | 0 .../892f9aabd92368a512b67dfa0f13a3c680de2bc9 | 0 .../8c4f975c761608a98ae79efe6ffc3345c1391bc4 | 0 .../93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 | 0 .../a1288cdc106e20724b8729bee339d7fa78a9096f | 0 .../a73cae39c74764efaf08d760ed3e5a42aea37ca2 | 0 .../b46ca719b34162ed593babf2bae7216774cbf02e | 0 .../bb9c38f9f1684753821ef3b801caeadc8c820f34 | 0 .../bee4e4b944ea58987b2d54eb48db85ad115ea816 | 0 .../cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 | 0 .../cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 | 0 .../d107e4c530045df456683e6f437cfe2843045178 | 0 .../d283e3b881e061fef91cc43c55bc7d85f6bb1a40 | 0 .../dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd | 0 .../f91503f99719558ba609448495d024217530b19e | 0 .../fb727c1802818d51fdf42b1d16818caa3dbe2b56 | 0 .idea/sonarlint/securityhotspotstore/index.pb | 45 ++ .../core/documentstore/DocStoreTest.java | 3 +- .../postgres/utils/PostgresUtils.java | 5 +- 48 files changed, 1190 insertions(+), 5 deletions(-) create mode 100644 .idea/sonarlint/issuestore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad create mode 100644 .idea/sonarlint/issuestore/2/5/2561871d99d8992bf90d0882349a013391cf0715 create mode 100644 .idea/sonarlint/issuestore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b create mode 100644 .idea/sonarlint/issuestore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c create mode 100644 .idea/sonarlint/issuestore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 create mode 100644 .idea/sonarlint/issuestore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 create mode 100644 .idea/sonarlint/issuestore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 create mode 100644 .idea/sonarlint/issuestore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 create mode 100644 .idea/sonarlint/issuestore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 create mode 100644 .idea/sonarlint/issuestore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 create mode 100644 .idea/sonarlint/issuestore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f create mode 100644 .idea/sonarlint/issuestore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 create mode 100644 .idea/sonarlint/issuestore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e create mode 100644 .idea/sonarlint/issuestore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 create mode 100644 .idea/sonarlint/issuestore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 create mode 100644 .idea/sonarlint/issuestore/c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 create mode 100644 .idea/sonarlint/issuestore/c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 create mode 100644 .idea/sonarlint/issuestore/d/1/d107e4c530045df456683e6f437cfe2843045178 create mode 100644 .idea/sonarlint/issuestore/d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 create mode 100644 .idea/sonarlint/issuestore/d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd create mode 100644 .idea/sonarlint/issuestore/f/9/f91503f99719558ba609448495d024217530b19e create mode 100644 .idea/sonarlint/issuestore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 create mode 100644 .idea/sonarlint/issuestore/index.pb create mode 100644 .idea/sonarlint/securityhotspotstore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad create mode 100644 .idea/sonarlint/securityhotspotstore/2/5/2561871d99d8992bf90d0882349a013391cf0715 create mode 100644 .idea/sonarlint/securityhotspotstore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b create mode 100644 .idea/sonarlint/securityhotspotstore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c create mode 100644 .idea/sonarlint/securityhotspotstore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 create mode 100644 .idea/sonarlint/securityhotspotstore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 create mode 100644 .idea/sonarlint/securityhotspotstore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 create mode 100644 .idea/sonarlint/securityhotspotstore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 create mode 100644 .idea/sonarlint/securityhotspotstore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 create mode 100644 .idea/sonarlint/securityhotspotstore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 create mode 100644 .idea/sonarlint/securityhotspotstore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f create mode 100644 .idea/sonarlint/securityhotspotstore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 create mode 100644 .idea/sonarlint/securityhotspotstore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e create mode 100644 .idea/sonarlint/securityhotspotstore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 create mode 100644 .idea/sonarlint/securityhotspotstore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 create mode 100644 .idea/sonarlint/securityhotspotstore/c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 create mode 100644 .idea/sonarlint/securityhotspotstore/c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 create mode 100644 .idea/sonarlint/securityhotspotstore/d/1/d107e4c530045df456683e6f437cfe2843045178 create mode 100644 .idea/sonarlint/securityhotspotstore/d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 create mode 100644 .idea/sonarlint/securityhotspotstore/d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd create mode 100644 .idea/sonarlint/securityhotspotstore/f/9/f91503f99719558ba609448495d024217530b19e create mode 100644 .idea/sonarlint/securityhotspotstore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 create mode 100644 .idea/sonarlint/securityhotspotstore/index.pb diff --git a/.idea/sonarlint/issuestore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad b/.idea/sonarlint/issuestore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad new file mode 100644 index 00000000..30ce8ea0 --- /dev/null +++ b/.idea/sonarlint/issuestore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad @@ -0,0 +1,3 @@ + +P +java:S1118 ":Add a private constructor to hide the implicit public one.(Ě \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/2/5/2561871d99d8992bf90d0882349a013391cf0715 b/.idea/sonarlint/issuestore/2/5/2561871d99d8992bf90d0882349a013391cf0715 new file mode 100644 index 00000000..8cc0a091 --- /dev/null +++ b/.idea/sonarlint/issuestore/2/5/2561871d99d8992bf90d0882349a013391cf0715 @@ -0,0 +1,5 @@ + +` java:S112("FDefine and throw a dedicated exception instead of using a generic one.(҂ +` java:S112-"FDefine and throw a dedicated exception instead of using a generic one.( +Y +java:S1155!">Use isEmpty() to check whether the collection is empty or not.( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b b/.idea/sonarlint/issuestore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/issuestore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c b/.idea/sonarlint/issuestore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c new file mode 100644 index 00000000..e22316cb --- /dev/null +++ b/.idea/sonarlint/issuestore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c @@ -0,0 +1,9 @@ + +b +java:S1192"LDefine a constant instead of duplicating this literal "key is null" 3 times.( +y +java:S6204"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'(㹦 +t +java:S6204)"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'( +y +java:S6204-"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'(聕 \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 b/.idea/sonarlint/issuestore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 new file mode 100644 index 00000000..60084e38 --- /dev/null +++ b/.idea/sonarlint/issuestore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 @@ -0,0 +1,22 @@ + +Z java:S112W"FDefine and throw a dedicated exception instead of using a generic one.(ݡ< +` java:S112c"FDefine and throw a dedicated exception instead of using a generic one.(Ϛ +a java:S112"FDefine and throw a dedicated exception instead of using a generic one.( +P +java:S1133&"5Do not forget to remove this deprecated code someday.( +P +java:S1133>"5Do not forget to remove this deprecated code someday.(΅ +P +java:S1133K"5Do not forget to remove this deprecated code someday.( +J +java:S1133W"5Do not forget to remove this deprecated code someday.(ݡ< +P +java:S1133c"5Do not forget to remove this deprecated code someday.(Ϛ +J +java:S1133m"5Do not forget to remove this deprecated code someday.(E +P +java:S1133x"5Do not forget to remove this deprecated code someday.(䈸 +Q +java:S1133"5Do not forget to remove this deprecated code someday.( + +java:S1130"Remove the declaration of thrown exception 'org.hypertrace.core.documentstore.model.exception.DuplicateDocumentException' which is a subclass of 'java.io.IOException'.(ߝ \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 b/.idea/sonarlint/issuestore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 new file mode 100644 index 00000000..8bbf20cb --- /dev/null +++ b/.idea/sonarlint/issuestore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 @@ -0,0 +1,9 @@ + +X +java:S6208"CMerge the previous cases into this one using comma-separated label.(ժ +^ +java:S6208^"CMerge the previous cases into this one using comma-separated label.( +U +java:S1118":Add a private constructor to hide the implicit public one.(彳 +h +java:S6204"RReplace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()'( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 b/.idea/sonarlint/issuestore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/issuestore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 b/.idea/sonarlint/issuestore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/issuestore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 b/.idea/sonarlint/issuestore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/issuestore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 b/.idea/sonarlint/issuestore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 new file mode 100644 index 00000000..1daf3d98 --- /dev/null +++ b/.idea/sonarlint/issuestore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 @@ -0,0 +1,5 @@ + +y +java:S3415"VSwap these 2 arguments so they are in the correct order: expected value, actual value.(Ɔ8ʡ1 +y +java:S3415"VSwap these 2 arguments so they are in the correct order: expected value, actual value.(Ɔ8ʡ1 \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f b/.idea/sonarlint/issuestore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f new file mode 100644 index 00000000..bed362b0 --- /dev/null +++ b/.idea/sonarlint/issuestore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f @@ -0,0 +1,5 @@ + +B +java:S3599",Use another way to initialize this instance.( +t +java:S1171"YMove the contents of this initializer to a standard constructor or to field initializers.( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 b/.idea/sonarlint/issuestore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 new file mode 100644 index 00000000..ffc83dab --- /dev/null +++ b/.idea/sonarlint/issuestore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 @@ -0,0 +1,7 @@ + +J +java:S3740b"/Provide the parametrized type for this generic.( +X +java:S6208q"CMerge the previous cases into this one using comma-separated label.(} +y +java:S6204R"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e b/.idea/sonarlint/issuestore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e new file mode 100644 index 00000000..71b94e8b --- /dev/null +++ b/.idea/sonarlint/issuestore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e @@ -0,0 +1,77 @@ + +h java:S112"FDefine and throw a dedicated exception instead of using a generic one.(҂81 +h java:S112"FDefine and throw a dedicated exception instead of using a generic one.(81 +` +java:S6208"CMerge the previous cases into this one using comma-separated label.(Q81 +a +java:S6208"CMerge the previous cases into this one using comma-separated label.(ҭ81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(Ҙ81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(ψ81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(—81 +a +java:S6208"CMerge the previous cases into this one using comma-separated label.(81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(81 +` +java:S6208"CMerge the previous cases into this one using comma-separated label.(Q81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(֫81 +a +java:S6208"CMerge the previous cases into this one using comma-separated label.(81 +a +java:S6208"CMerge the previous cases into this one using comma-separated label.(ҭ81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(Ҙ81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(ψ81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(—81 +a +java:S6208"CMerge the previous cases into this one using comma-separated label.(81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(81 +` +java:S6208"CMerge the previous cases into this one using comma-separated label.(Q81 +f +java:S6208"CMerge the previous cases into this one using comma-separated label.(֫81 +a +java:S6208"CMerge the previous cases into this one using comma-separated label.(81 +a +java:S6208"CMerge the previous cases into this one using comma-separated label.(81 +a +java:S6208"CMerge the previous cases into this one using comma-separated label.(81 +d +java:S1192"GDefine a constant instead of duplicating this literal "NOT IN" 3 times.(Q81 +j +java:S1192"GDefine a constant instead of duplicating this literal "NOT_IN" 3 times.(81 +k +java:S1192"HDefine a constant instead of duplicating this literal "::jsonb" 3 times.(81 +b +java:S2583"DChange this condition so that it does not always evaluate to "false"(81 +: +java:S2386."Make this member "protected".(ٲ޺81 +` +java:S1155j">Use isEmpty() to check whether the collection is empty or not.(81 +{ +java:S6204"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'(881 +s +java:S1612"UReplace this lambda with method reference 'PostgresUtils::wrapAliasWithDoubleQuotes'.(81 +u +java:S3776"RRefactor this method to reduce its Cognitive Complexity from 24 to the 15 allowed.(81 +U +java:S1135"2Complete the task associated to this TODO comment.(81 +U +java:S1135"2Complete the task associated to this TODO comment.(81 +h +java:S6201"JReplace this instanceof check and cast with 'instanceof Document document'(81 +U +java:S1135"2Complete the task associated to this TODO comment.(81 +O +java:S3599",Use another way to initialize this instance.(81 +| +java:S1171"YMove the contents of this initializer to a standard constructor or to field initializers.(81 +_ +java:S1126"AReplace this if-then-else statement by a single return statement.(81 \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 b/.idea/sonarlint/issuestore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 new file mode 100644 index 00000000..4a983d58 --- /dev/null +++ b/.idea/sonarlint/issuestore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 @@ -0,0 +1,555 @@ + +\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.(ꛬ +a java:S112 "FDefine and throw a dedicated exception instead of using a generic one.( +a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(ܺ +a java:S112"FDefine and throw a dedicated exception instead of using a generic one.( +a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(ğ +\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.(߬ +\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.( +\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.( +F +java:S3740 "/Provide the parametrized type for this generic.( +F +java:S3740"/Provide the parametrized type for this generic.( +K +java:S3740"/Provide the parametrized type for this generic.( +u +java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").( +n +java:S1192"RDefine a constant instead of duplicating this literal "\"name\":\"abc5\"" 5 times.( + +java:S1192"nDefine a constant instead of duplicating this literal "\"FQN\":{\"value\":{\"string\":\"driver\"}}}," 7 times.( +c +java:S1192"GDefine a constant instead of duplicating this literal "score" 16 times.(¡ +b +java:S1192"LDefine a constant instead of duplicating this literal "subDocPath1" 4 times.(əd +h +java:S1192"LDefine a constant instead of duplicating this literal "subDocPath2" 3 times.(ٟ +a +java:S1192"JDefine a constant instead of duplicating this literal "bangalore" 3 times.(Ǭ + +java:S1192"dDefine a constant instead of duplicating this literal "attributes.labels.valueList.values" 11 times.(ة +c +java:S1192"GDefine a constant instead of duplicating this literal "subdoc" 9 times.( +l +java:S1192"PDefine a constant instead of duplicating this literal "bob@example.com" 4 times.(ڀ +_ +java:S1192"HDefine a constant instead of duplicating this literal "labels" 29 times.(Ǩ +^ +java:S1192"GDefine a constant instead of duplicating this literal "field" 11 times.(㐙 +g +java:S1192"KDefine a constant instead of duplicating this literal "nestedkey1" 6 times.(Ϗ +n +java:S1192"RDefine a constant instead of duplicating this literal "\"name\":\"abc4\"" 4 times.( + +java:S1192"Define a constant instead of duplicating this literal "\"entityId\":\"e3ffc6f0-fc92-3a9c-9fa0-26269184d1aa\",\"entityName\":\"driver\"," 7 times.(ӌ +a +java:S1192"JDefine a constant instead of duplicating this literal "products" 10 times.( +` +java:S1192"JDefine a constant instead of duplicating this literal "default" 124 times.( +^ +java:S1192"HDefine a constant instead of duplicating this literal "testKey" 9 times.( +b +java:S1192"FDefine a constant instead of duplicating this literal "email" 4 times.(ڀ +_ +java:S1192Y"IDefine a constant instead of duplicating this literal "postgres" 4 times.(ۡω +a +java:S1192"KDefine a constant instead of duplicating this literal "timestamp" 10 times.(əd +e +java:S1192"IDefine a constant instead of duplicating this literal "product" 18 times.(¡ +h +java:S1192"LDefine a constant instead of duplicating this literal "attributes" 47 times.( +i +java:S1192"RDefine a constant instead of duplicating this literal "\"name\":\"abc3\"" 4 times.( +f +java:S1192"JDefine a constant instead of duplicating this literal "isCostly" 29 times.( + +java:S1192"Define a constant instead of duplicating this literal "\"entityType\":\"SERVICE\",\"identifyingAttributes\":{\"FQN\":{\"value\":{\"string" 7 times.( +j +java:S1192"NDefine a constant instead of duplicating this literal "malformedJson" 3 times.( +n +java:S1192"RDefine a constant instead of duplicating this literal "\"key1\":\"abc1\"" 4 times.(넠 +b +java:S1192"FDefine a constant instead of duplicating this literal "Alice" 8 times.( + +java:S1192"mDefine a constant instead of duplicating this literal "\":\"driver\"}}},\"tenantId\":\"__default\"}" 7 times.(舂 + +java:S1192"{Define a constant instead of duplicating this literal "\"span_id\":{\"value\":{\"string\":\"6449f1f720c93a67\"}}," 6 times.( +i +java:S1192"RDefine a constant instead of duplicating this literal "\"key1\":\"abc4\"" 4 times.(چ +d +java:S1192"HDefine a constant instead of duplicating this literal "string" 63 times.( +b +java:S1192"FDefine a constant instead of duplicating this literal "color" 6 times.( +f +java:S1192"JDefine a constant instead of duplicating this literal "testKey2" 50 times.( +f +java:S1192"JDefine a constant instead of duplicating this literal "testKey1" 81 times.( +a +java:S1192"JDefine a constant instead of duplicating this literal "testKey4" 39 times.(ˌ +_ +java:S1192"HDefine a constant instead of duplicating this literal "values" 29 times.( +f +java:S1192"JDefine a constant instead of duplicating this literal "testKey3" 45 times.( +e +java:S1192"IDefine a constant instead of duplicating this literal "testKey6" 4 times.( +a +java:S1192"JDefine a constant instead of duplicating this literal "testKey5" 11 times.( +f +java:S1192"JDefine a constant instead of duplicating this literal "tenant-1" 10 times.( +^ +java:S1192"GDefine a constant instead of duplicating this literal "value" 74 times.(㐙 +^ +java:S1192"GDefine a constant instead of duplicating this literal "amount" 4 times.(ꓦ +d +java:S1192"HDefine a constant instead of duplicating this literal "Label1" 20 times.( +d +java:S1192"HDefine a constant instead of duplicating this literal "Label3" 21 times.( +d +java:S1192"HDefine a constant instead of duplicating this literal "Label2" 22 times.(Պ + +java:S1192"~Define a constant instead of duplicating this literal "\"service_type\":{\"value\":{\"string\":\"JAEGER_SERVICE\"}}," 7 times.(Ո + +java:S1192"sDefine a constant instead of duplicating this literal "\"string\":\"00000000000000005e194fdf9fbf5101\"}}," 4 times.(Ξ +b +java:S1192"KDefine a constant instead of duplicating this literal "valueList" 29 times.(肒 +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +I +java:S1199"-Extract this nested code block into a method.( +i +java:S2095J"NUse try-with-resources or close this "GenericContainer" in a "finally" clause.(ǎ +i +java:S2095X"NUse try-with-resources or close this "GenericContainer" in a "finally" clause.( +J +java:S1874T"4Remove this use of "getDatastore"; it is deprecated.(Ǚ +E java:S106U"+Replace this use of System.out by a logger.( +J +java:S1874g"4Remove this use of "getDatastore"; it is deprecated.( +E java:S106h"+Replace this use of System.out by a logger.( +^ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +^ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(朿 +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(˂ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ȗ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +A java:S106"+Replace this use of System.out by a logger.(҇ +W java:S125"Use isEmpty() to check whether the collection is empty or not.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ +i java:S100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +i java:S100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +Q +java:S1612":Replace this lambda with method reference 'Thread::start'.( +z +java:S2142"^Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.( +H +java:S3599",Use another way to initialize this instance.( +u +java:S1171"YMove the contents of this initializer to a standard constructor or to field initializers.( +K +java:S1172"4Remove this unused method parameter "dataStoreName".( +K +java:S1172"4Remove this unused method parameter "dataStoreName".( +B +java:S5960"+Remove this assertion from production code.(㫈 +P +java:S1144"4Remove this unused private "assertSizeEqual" method.(Ҽ \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 b/.idea/sonarlint/issuestore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 new file mode 100644 index 00000000..9a491e48 --- /dev/null +++ b/.idea/sonarlint/issuestore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 @@ -0,0 +1,292 @@ + +a java:S112"FDefine and throw a dedicated exception instead of using a generic one.( +\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.(͘ +a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(˺ +a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(ɂ + +java:S1192"uDefine a constant instead of duplicating this literal "\"name\":\"X-Content-Type-Options without nosniff\"," 3 times.(⋲ +f +java:S1192"JDefine a constant instead of duplicating this literal "ENTITY_ID" 3 times.( +w +java:S1192"`Define a constant instead of duplicating this literal "\"environment\":\"cluster001\"," 3 times.( +^ +java:S1192"GDefine a constant instead of duplicating this literal "Bottle" 6 times.( + +java:S1192"Define a constant instead of duplicating this literal "\"type\":\"VULNERABILITY_TYPE_MISSING_NOSNIFF_IN_CONTENT_TYPE_OPTIONS_HEADER\"," 3 times.(Ա +^ +java:S1192"GDefine a constant instead of duplicating this literal "price" 74 times.( +a +java:S1192"JDefine a constant instead of duplicating this literal "new_value" 3 times.( +j +java:S1192"NDefine a constant instead of duplicating this literal "props.planets" 4 times.(؂ +e +java:S1192"NDefine a constant instead of duplicating this literal "sales.medium" 19 times.( +c +java:S1192"GDefine a constant instead of duplicating this literal "props" 19 times.( +~ +java:S1192"gDefine a constant instead of duplicating this literal "\"detection_timestamp\":1663312992746," 3 times.(Ŧ +| +java:S1192"eDefine a constant instead of duplicating this literal "e2e7f827-7ea5-5a5f-b547-d737965e4e58" 3 times.(ًا + +java:S1192"fDefine a constant instead of duplicating this literal "query/updatable_collection_data.json" 18 times.( +| +java:S1192"`Define a constant instead of duplicating this literal "\"entity_name\":\"POST/login\"," 3 times.(Ѣ +w +java:S1192"[Define a constant instead of duplicating this literal "query/collection_data.json" 6 times.( + +java:S1192"fDefine a constant instead of duplicating this literal "query/not_exists_filter_response.json" 4 times.( +d +java:S1192"NDefine a constant instead of duplicating this literal "VULNERABILITY" 3 times.(5 +b +java:S1192"KDefine a constant instead of duplicating this literal "props.size" 3 times.( +t +java:S1192"XDefine a constant instead of duplicating this literal "query/sum_response.json" 4 times.( +~ +java:S1192"bDefine a constant instead of duplicating this literal "query/exists_filter_response.json" 4 times.(ߔ +m +java:S1192"VDefine a constant instead of duplicating this literal "2022-08-09T18:53:17Z" 14 times.(۝ + +java:S1192"yDefine a constant instead of duplicating this literal "\"service_id\":\"8d64ccfb-ad07-3a3c-bc32-740f1c794b7d\"," 3 times.(˺ +s +java:S1192"\Define a constant instead of duplicating this literal "\"type\":\"VULNERABILITY\"," 3 times.(ɃҴ +` +java:S1192"IDefine a constant instead of duplicating this literal "postgres" 4 times.(ۡω +v +java:S1192"ZDefine a constant instead of duplicating this literal "props.seller.address.city" 3 times.(͖ +k +java:S1192"TDefine a constant instead of duplicating this literal "props.appended.list" 4 times.( +g +java:S1192"PDefine a constant instead of duplicating this literal "num_items.value" 3 times.(ߢ +q +java:S1192"ZDefine a constant instead of duplicating this literal "{\"json\": \"new_value\"}" 6 times.(򈲰 +_ +java:S1192"IDefine a constant instead of duplicating this literal "tenantId" 3 times.( + +java:S1192"rDefine a constant instead of duplicating this literal "\"_id\":\"e2e7f827-7ea5-5a5f-b547-d737965e4e58\"," 3 times.(܍ +y +java:S1192"bDefine a constant instead of duplicating this literal "query/simple_filter_response.json" 4 times.(ͣ +a +java:S1192"KDefine a constant instead of duplicating this literal "quantities" 4 times.( +x +java:S1192"\Define a constant instead of duplicating this literal "\"identifyingAttributes\":{" 3 times.( +v +java:S1192"_Define a constant instead of duplicating this literal "query/key_filter_response.json" 5 times.( +g +java:S1192"PDefine a constant instead of duplicating this literal "\"attributes\":" 3 times.(⴨ +g +java:S1192"PDefine a constant instead of duplicating this literal "props.added.set" 4 times.(Ɛ +q +java:S1192"UDefine a constant instead of duplicating this literal "\"status\":\"OPEN\"," 3 times.( +\ +java:S1192"FDefine a constant instead of duplicating this literal "Pluto" 5 times.(H +^ +java:S1192"GDefine a constant instead of duplicating this literal "sales" 19 times.( +c +java:S1192"GDefine a constant instead of duplicating this literal "STATUS" 3 times.( +b +java:S1192"KDefine a constant instead of duplicating this literal "qty_count" 16 times.(ˉ +q +java:S1192"UDefine a constant instead of duplicating this literal "attributes.entity_id" 3 times.( +l +java:S1192"PDefine a constant instead of duplicating this literal "\"tenantId\":\"" 3 times.(̽ + +java:S1192"lDefine a constant instead of duplicating this literal "\"status_update_timestamp\":1663312992746}," 3 times.(Ͻ + +java:S1192"eDefine a constant instead of duplicating this literal "props.new_property.deep.nested.value" 7 times.(Ꞁ +p +java:S1192"TDefine a constant instead of duplicating this literal "sales.medium.volume" 4 times.(ƻ +m +java:S1192"QDefine a constant instead of duplicating this literal "props.added.list" 6 times.(Ы +] +java:S1192"FDefine a constant instead of duplicating this literal "count" 7 times.(񹠫 +{ +java:S1192"_Define a constant instead of duplicating this literal "props.new_property.deep.nested" 3 times.( + +java:S1192"yDefine a constant instead of duplicating this literal "\"entity_id\":\"79d2ffc4-38a6-376f-a57f-89893f0acb5b\"}}" 3 times.(Ž +^ +java:S1192"GDefine a constant instead of duplicating this literal "Dettol" 6 times.( +d +java:S1192 +"MDefine a constant instead of duplicating this literal "props.colors" 4 times.(ʔٰ + +java:S1192"xDefine a constant instead of duplicating this literal "\"entity_id\":\"79d2ffc4-38a6-376f-a57f-89893f0acb5b\"," 3 times.( +c +java:S1192"LDefine a constant instead of duplicating this literal "sales.city" 16 times.( +u +java:S1192"YDefine a constant instead of duplicating this literal "\"entity_type\":\"API\"," 3 times.(翟 +l +java:S1192"UDefine a constant instead of duplicating this literal "\"nginx-traceshop\"," 3 times.(ɇ +c +java:S1192"GDefine a constant instead of duplicating this literal "Mirror" 5 times.(혾 +~ +java:S1192"gDefine a constant instead of duplicating this literal "\"is_external\":true,\"service_name\":" 3 times.( + +java:S1192"vDefine a constant instead of duplicating this literal "{\"name\":\"X-Content-Type-Options without nosniff\"," 3 times.(± +c +java:S1192"GDefine a constant instead of duplicating this literal "total" 11 times.(䉔 + +java:S1192"rDefine a constant instead of duplicating this literal "{\"id\":\"e2e7f827-7ea5-5a5f-b547-d737965e4e58\"," 3 times.( + +java:S1192"wDefine a constant instead of duplicating this literal "query/filter_with_sorting_and_pagination_response.json" 3 times.( +f +java:S1192"JDefine a constant instead of duplicating this literal "quantity" 65 times.( +o +java:S1192"SDefine a constant instead of duplicating this literal "sales.medium.type" 16 times.( +d +java:S1192"HDefine a constant instead of duplicating this literal "Shampoo" 5 times.(혾 +s +java:S1192"WDefine a constant instead of duplicating this literal "\"severity\":\"HIGH\"," 3 times.( +q +java:S1192"ZDefine a constant instead of duplicating this literal "query/count_response.json" 4 times.(Ԗ +n +java:S1192"RDefine a constant instead of duplicating this literal "attributes.status" 3 times.( +i +java:S1192"MDefine a constant instead of duplicating this literal "props.brand" 12 times.( + +java:S1192"rDefine a constant instead of duplicating this literal "query/test_functional_lhs_in_filter_response.json" 4 times.( +t +java:S1192"]Define a constant instead of duplicating this literal "props.seller.address.pincode" 3 times.( +i +java:S1192"RDefine a constant instead of duplicating this literal "props.seller.name" 4 times.( +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(u +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ܼ +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ߺ +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ѷ +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(u +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ܼ +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ߺ +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(督 +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ؾ +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +j +java:S2095"NUse try-with-resources or close this "GenericContainer" in a "finally" clause.( +i +java:S2095"NUse try-with-resources or close this "GenericContainer" in a "finally" clause.(ǎ +o +java:S3655"XCall "doc2Optional.isPresent()" or "!doc2Optional.isEmpty()" before accessing the value.( +t +java:S3655"XCall "doc1Optional.isPresent()" or "!doc1Optional.isEmpty()" before accessing the value.( +o +java:S3655"XCall "doc2Optional.isPresent()" or "!doc2Optional.isEmpty()" before accessing the value.( +o +java:S3655"XCall "doc2Optional.isPresent()" or "!doc2Optional.isEmpty()" before accessing the value.( +t +java:S3655"XCall "doc1Optional.isPresent()" or "!doc1Optional.isEmpty()" before accessing the value.( +t +java:S3655"XCall "doc1Optional.isPresent()" or "!doc1Optional.isEmpty()" before accessing the value.( +o +java:S3655"XCall "doc2Optional.isPresent()" or "!doc2Optional.isEmpty()" before accessing the value.( +t +java:S3655"XCall "doc1Optional.isPresent()" or "!doc1Optional.isEmpty()" before accessing the value.( +K +java:S1874"4Remove this use of "getDatastore"; it is deprecated.(Ǚ +F java:S106"+Replace this use of System.out by a logger.( +K +java:S1874"4Remove this use of "getDatastore"; it is deprecated.( +F java:S106"+Replace this use of System.out by a logger.( +H +java:S3985"1Remove this unused private "MongoProvider" class.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +d java:S100 +"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(֒ +i java:S100 "NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +i java:S100 "NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(̐ +d +java:S5738 "HRemove this call to a deprecated method, it has been marked for removal.(ǣ +5 +java:S2119"Save and re-use this "Random".( +u +java:S6204"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'( +5 +java:S2119"Save and re-use this "Random".( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ +5 +java:S2119"Save and re-use this "Random".( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(϶ +5 +java:S2119"Save and re-use this "Random".( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(϶ +5 +java:S2119"Save and re-use this "Random".( +_ +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(϶ +5 +java:S2119"Save and re-use this "Random".( +d +java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( +S +java:S1854"Use isEmpty() to check whether the collection is empty or not.( +] +java:S5738"FDon't override this deprecated method, it has been marked for removal.( +o +java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ɮ +5 +java:S3457"2nd argument is not used.(獰 +b +java:S5738"FDon't override this deprecated method, it has been marked for removal.( +R +java:S1172"6Remove this unused method parameter "idToTenantIdMap".( +R +java:S1172"6Remove this unused method parameter "idToTenantIdMap".( +R +java:S1172"6Remove this unused method parameter "idToTenantIdMap".( +i +java:S6204"RReplace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()'(ҳ +o +java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ɮ +t +java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ԧ˦ +o +java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ɮ +o +java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ﭣ +g java:S116 "QRename this field "MAPPER" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +e +java:S2272 +"NAdd a "NoSuchElementException" for iteration beyond the end of the collection.( +W +java:S3398 +";Move this method into "PostgresResultIteratorWithMetaData".( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/f/9/f91503f99719558ba609448495d024217530b19e b/.idea/sonarlint/issuestore/f/9/f91503f99719558ba609448495d024217530b19e new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/issuestore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 b/.idea/sonarlint/issuestore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 00000000..e97fe460 --- /dev/null +++ b/.idea/sonarlint/issuestore/index.pb @@ -0,0 +1,45 @@ + + +bdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/operators/SortOrder.java,c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 + +fdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/type/FromTypeExpression.java,8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 + +Pdocument-store/src/main/java/org/hypertrace/core/documentstore/query/Filter.java,d/1/d107e4c530045df456683e6f437cfe2843045178 + +hdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/type/FilterTypeExpression.java,8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 + +Zdocument-store/src/integrationTest/java/org/hypertrace/core/documentstore/utils/Utils.java,c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 + +tdocument-store/src/main/java/org/hypertrace/core/documentstore/mongo/query/parser/MongoSortTypeExpressionParser.java,a/1/a1288cdc106e20724b8729bee339d7fa78a9096f + +bdocument-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java,b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 + +Zdocument-store/src/main/java/org/hypertrace/core/documentstore/mongo/MongoQueryParser.java,6/b/6b7749b677774a72e32ce7b9c682307ace86b109 + +adocument-store/src/main/java/org/hypertrace/core/documentstore/expression/impl/KeyExpression.java,3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c +} +Mdocument-store/src/main/java/org/hypertrace/core/documentstore/Datastore.java,3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b + +qdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/update/parser/PostgresAddValueParser.java,f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 + +document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresDataAccessorIdentifierExpressionVisitor.java,d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 + +document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresAggregationFilterTypeExpressionVisitor.java,f/9/f91503f99719558ba609448495d024217530b19e + +document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresFilterTypeExpressionVisitor.java,a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 +~ +Ndocument-store/src/main/java/org/hypertrace/core/documentstore/Collection.java,4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 + +rdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/subdoc/PostgresSubDocumentValueParser.java,8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 + +[document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java,b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 + +_document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresCollection.java,d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd + +bdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresQueryExecutor.java,2/5/2561871d99d8992bf90d0882349a013391cf0715 + +ddocument-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java,9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 + +`document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParser.java,1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad + +`document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java,b/4/b46ca719b34162ed593babf2bae7216774cbf02e \ No newline at end of file diff --git a/.idea/sonarlint/securityhotspotstore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad b/.idea/sonarlint/securityhotspotstore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/2/5/2561871d99d8992bf90d0882349a013391cf0715 b/.idea/sonarlint/securityhotspotstore/2/5/2561871d99d8992bf90d0882349a013391cf0715 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b b/.idea/sonarlint/securityhotspotstore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c b/.idea/sonarlint/securityhotspotstore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 b/.idea/sonarlint/securityhotspotstore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 b/.idea/sonarlint/securityhotspotstore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 b/.idea/sonarlint/securityhotspotstore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 b/.idea/sonarlint/securityhotspotstore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 b/.idea/sonarlint/securityhotspotstore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 b/.idea/sonarlint/securityhotspotstore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f b/.idea/sonarlint/securityhotspotstore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 b/.idea/sonarlint/securityhotspotstore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e b/.idea/sonarlint/securityhotspotstore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 b/.idea/sonarlint/securityhotspotstore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 b/.idea/sonarlint/securityhotspotstore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 b/.idea/sonarlint/securityhotspotstore/c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 b/.idea/sonarlint/securityhotspotstore/c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/d/1/d107e4c530045df456683e6f437cfe2843045178 b/.idea/sonarlint/securityhotspotstore/d/1/d107e4c530045df456683e6f437cfe2843045178 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 b/.idea/sonarlint/securityhotspotstore/d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd b/.idea/sonarlint/securityhotspotstore/d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/f/9/f91503f99719558ba609448495d024217530b19e b/.idea/sonarlint/securityhotspotstore/f/9/f91503f99719558ba609448495d024217530b19e new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 b/.idea/sonarlint/securityhotspotstore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/index.pb b/.idea/sonarlint/securityhotspotstore/index.pb new file mode 100644 index 00000000..19c36956 --- /dev/null +++ b/.idea/sonarlint/securityhotspotstore/index.pb @@ -0,0 +1,45 @@ + + +bdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/operators/SortOrder.java,c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 + +tdocument-store/src/main/java/org/hypertrace/core/documentstore/mongo/query/parser/MongoSortTypeExpressionParser.java,a/1/a1288cdc106e20724b8729bee339d7fa78a9096f + +fdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/type/FromTypeExpression.java,8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 + +Pdocument-store/src/main/java/org/hypertrace/core/documentstore/query/Filter.java,d/1/d107e4c530045df456683e6f437cfe2843045178 + +hdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/type/FilterTypeExpression.java,8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 + +Zdocument-store/src/integrationTest/java/org/hypertrace/core/documentstore/utils/Utils.java,c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 + +bdocument-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java,b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 + +Zdocument-store/src/main/java/org/hypertrace/core/documentstore/mongo/MongoQueryParser.java,6/b/6b7749b677774a72e32ce7b9c682307ace86b109 + +adocument-store/src/main/java/org/hypertrace/core/documentstore/expression/impl/KeyExpression.java,3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c + +rdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/subdoc/PostgresSubDocumentValueParser.java,8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 +} +Mdocument-store/src/main/java/org/hypertrace/core/documentstore/Datastore.java,3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b + +qdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/update/parser/PostgresAddValueParser.java,f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 + +document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresDataAccessorIdentifierExpressionVisitor.java,d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 + +document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresAggregationFilterTypeExpressionVisitor.java,f/9/f91503f99719558ba609448495d024217530b19e + +document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresFilterTypeExpressionVisitor.java,a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 +~ +Ndocument-store/src/main/java/org/hypertrace/core/documentstore/Collection.java,4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 + +[document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java,b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 + +`document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParser.java,1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad + +_document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresCollection.java,d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd + +bdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresQueryExecutor.java,2/5/2561871d99d8992bf90d0882349a013391cf0715 + +ddocument-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java,9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 + +`document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java,b/4/b46ca719b34162ed593babf2bae7216774cbf02e \ No newline at end of file diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java index 8af6c15e..38273c2e 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java @@ -124,8 +124,7 @@ public static void shutdown() { @MethodSource private static Stream databaseContextProvider() { - // return Stream.of(Arguments.of(MONGO_STORE), Arguments.of(POSTGRES_STORE)); - return Stream.of(Arguments.of(POSTGRES_STORE)); + return Stream.of(Arguments.of(MONGO_STORE), Arguments.of(POSTGRES_STORE)); } @MethodSource diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java index cc9c032a..7567affb 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java @@ -184,15 +184,14 @@ public static String prepareParameterizedStringForJsonList( public static String parseNonCompositeFilterWithCasting( String fieldName, String columnName, String op, Object value, Builder paramsBuilder) { - String parsedExpression = prepareFieldDataAccessorExpr(fieldName, columnName); + String parsedExpression = + prepareCast(prepareFieldDataAccessorExpr(fieldName, columnName), value); if (isInOp(op)) { if (isFirstClassColumn(parsedExpression)) { parsedExpression = "to_jsonb(" + parsedExpression + ")"; } else { parsedExpression = parsedExpression.replace("->>", "->"); } - } else { - parsedExpression = prepareCast(parsedExpression, value); } return parseNonCompositeFilter( fieldName, parsedExpression, columnName, op, value, paramsBuilder); From 7d61dff9b7f06f7a4b7aab846474864f55f25b45 Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Thu, 30 Nov 2023 13:37:29 +0530 Subject: [PATCH 3/9] remove --- .../1a9bdbfaccb9672e42866cddd17df4f64d68fbad | 3 - .../2561871d99d8992bf90d0882349a013391cf0715 | 5 - .../36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b | 0 .../3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c | 9 - .../4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 | 22 - .../6b7749b677774a72e32ce7b9c682307ace86b109 | 9 - .../808dbf2dad3b587591c985b04f47edef3aa70f39 | 0 .../892f9aabd92368a512b67dfa0f13a3c680de2bc9 | 0 .../8c4f975c761608a98ae79efe6ffc3345c1391bc4 | 0 .../93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 | 5 - .../a1288cdc106e20724b8729bee339d7fa78a9096f | 5 - .../a73cae39c74764efaf08d760ed3e5a42aea37ca2 | 7 - .../b46ca719b34162ed593babf2bae7216774cbf02e | 77 --- .../bb9c38f9f1684753821ef3b801caeadc8c820f34 | 555 ------------------ .../bee4e4b944ea58987b2d54eb48db85ad115ea816 | 292 --------- .../cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 | 0 .../cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 | 7 - .../d107e4c530045df456683e6f437cfe2843045178 | 0 .../d283e3b881e061fef91cc43c55bc7d85f6bb1a40 | 0 .../dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd | 101 ---- .../f91503f99719558ba609448495d024217530b19e | 0 .../fb727c1802818d51fdf42b1d16818caa3dbe2b56 | 0 .idea/sonarlint/issuestore/index.pb | 45 -- .../1a9bdbfaccb9672e42866cddd17df4f64d68fbad | 0 .../2561871d99d8992bf90d0882349a013391cf0715 | 0 .../36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b | 0 .../3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c | 0 .../4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 | 0 .../6b7749b677774a72e32ce7b9c682307ace86b109 | 0 .../808dbf2dad3b587591c985b04f47edef3aa70f39 | 0 .../892f9aabd92368a512b67dfa0f13a3c680de2bc9 | 0 .../8c4f975c761608a98ae79efe6ffc3345c1391bc4 | 0 .../93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 | 0 .../a1288cdc106e20724b8729bee339d7fa78a9096f | 0 .../a73cae39c74764efaf08d760ed3e5a42aea37ca2 | 0 .../b46ca719b34162ed593babf2bae7216774cbf02e | 0 .../bb9c38f9f1684753821ef3b801caeadc8c820f34 | 0 .../bee4e4b944ea58987b2d54eb48db85ad115ea816 | 0 .../cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 | 0 .../cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 | 0 .../d107e4c530045df456683e6f437cfe2843045178 | 0 .../d283e3b881e061fef91cc43c55bc7d85f6bb1a40 | 0 .../dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd | 0 .../f91503f99719558ba609448495d024217530b19e | 0 .../fb727c1802818d51fdf42b1d16818caa3dbe2b56 | 0 .idea/sonarlint/securityhotspotstore/index.pb | 45 -- 46 files changed, 1187 deletions(-) delete mode 100644 .idea/sonarlint/issuestore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad delete mode 100644 .idea/sonarlint/issuestore/2/5/2561871d99d8992bf90d0882349a013391cf0715 delete mode 100644 .idea/sonarlint/issuestore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b delete mode 100644 .idea/sonarlint/issuestore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c delete mode 100644 .idea/sonarlint/issuestore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 delete mode 100644 .idea/sonarlint/issuestore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 delete mode 100644 .idea/sonarlint/issuestore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 delete mode 100644 .idea/sonarlint/issuestore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 delete mode 100644 .idea/sonarlint/issuestore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 delete mode 100644 .idea/sonarlint/issuestore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 delete mode 100644 .idea/sonarlint/issuestore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f delete mode 100644 .idea/sonarlint/issuestore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 delete mode 100644 .idea/sonarlint/issuestore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e delete mode 100644 .idea/sonarlint/issuestore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 delete mode 100644 .idea/sonarlint/issuestore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 delete mode 100644 .idea/sonarlint/issuestore/c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 delete mode 100644 .idea/sonarlint/issuestore/c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 delete mode 100644 .idea/sonarlint/issuestore/d/1/d107e4c530045df456683e6f437cfe2843045178 delete mode 100644 .idea/sonarlint/issuestore/d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 delete mode 100644 .idea/sonarlint/issuestore/d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd delete mode 100644 .idea/sonarlint/issuestore/f/9/f91503f99719558ba609448495d024217530b19e delete mode 100644 .idea/sonarlint/issuestore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 delete mode 100644 .idea/sonarlint/issuestore/index.pb delete mode 100644 .idea/sonarlint/securityhotspotstore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad delete mode 100644 .idea/sonarlint/securityhotspotstore/2/5/2561871d99d8992bf90d0882349a013391cf0715 delete mode 100644 .idea/sonarlint/securityhotspotstore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b delete mode 100644 .idea/sonarlint/securityhotspotstore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c delete mode 100644 .idea/sonarlint/securityhotspotstore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 delete mode 100644 .idea/sonarlint/securityhotspotstore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 delete mode 100644 .idea/sonarlint/securityhotspotstore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 delete mode 100644 .idea/sonarlint/securityhotspotstore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 delete mode 100644 .idea/sonarlint/securityhotspotstore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 delete mode 100644 .idea/sonarlint/securityhotspotstore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 delete mode 100644 .idea/sonarlint/securityhotspotstore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f delete mode 100644 .idea/sonarlint/securityhotspotstore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 delete mode 100644 .idea/sonarlint/securityhotspotstore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e delete mode 100644 .idea/sonarlint/securityhotspotstore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 delete mode 100644 .idea/sonarlint/securityhotspotstore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 delete mode 100644 .idea/sonarlint/securityhotspotstore/c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 delete mode 100644 .idea/sonarlint/securityhotspotstore/c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 delete mode 100644 .idea/sonarlint/securityhotspotstore/d/1/d107e4c530045df456683e6f437cfe2843045178 delete mode 100644 .idea/sonarlint/securityhotspotstore/d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 delete mode 100644 .idea/sonarlint/securityhotspotstore/d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd delete mode 100644 .idea/sonarlint/securityhotspotstore/f/9/f91503f99719558ba609448495d024217530b19e delete mode 100644 .idea/sonarlint/securityhotspotstore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 delete mode 100644 .idea/sonarlint/securityhotspotstore/index.pb diff --git a/.idea/sonarlint/issuestore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad b/.idea/sonarlint/issuestore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad deleted file mode 100644 index 30ce8ea0..00000000 --- a/.idea/sonarlint/issuestore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad +++ /dev/null @@ -1,3 +0,0 @@ - -P -java:S1118 ":Add a private constructor to hide the implicit public one.(Ě \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/2/5/2561871d99d8992bf90d0882349a013391cf0715 b/.idea/sonarlint/issuestore/2/5/2561871d99d8992bf90d0882349a013391cf0715 deleted file mode 100644 index 8cc0a091..00000000 --- a/.idea/sonarlint/issuestore/2/5/2561871d99d8992bf90d0882349a013391cf0715 +++ /dev/null @@ -1,5 +0,0 @@ - -` java:S112("FDefine and throw a dedicated exception instead of using a generic one.(҂ -` java:S112-"FDefine and throw a dedicated exception instead of using a generic one.( -Y -java:S1155!">Use isEmpty() to check whether the collection is empty or not.( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b b/.idea/sonarlint/issuestore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/issuestore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c b/.idea/sonarlint/issuestore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c deleted file mode 100644 index e22316cb..00000000 --- a/.idea/sonarlint/issuestore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c +++ /dev/null @@ -1,9 +0,0 @@ - -b -java:S1192"LDefine a constant instead of duplicating this literal "key is null" 3 times.( -y -java:S6204"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'(㹦 -t -java:S6204)"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'( -y -java:S6204-"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'(聕 \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 b/.idea/sonarlint/issuestore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 deleted file mode 100644 index 60084e38..00000000 --- a/.idea/sonarlint/issuestore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 +++ /dev/null @@ -1,22 +0,0 @@ - -Z java:S112W"FDefine and throw a dedicated exception instead of using a generic one.(ݡ< -` java:S112c"FDefine and throw a dedicated exception instead of using a generic one.(Ϛ -a java:S112"FDefine and throw a dedicated exception instead of using a generic one.( -P -java:S1133&"5Do not forget to remove this deprecated code someday.( -P -java:S1133>"5Do not forget to remove this deprecated code someday.(΅ -P -java:S1133K"5Do not forget to remove this deprecated code someday.( -J -java:S1133W"5Do not forget to remove this deprecated code someday.(ݡ< -P -java:S1133c"5Do not forget to remove this deprecated code someday.(Ϛ -J -java:S1133m"5Do not forget to remove this deprecated code someday.(E -P -java:S1133x"5Do not forget to remove this deprecated code someday.(䈸 -Q -java:S1133"5Do not forget to remove this deprecated code someday.( - -java:S1130"Remove the declaration of thrown exception 'org.hypertrace.core.documentstore.model.exception.DuplicateDocumentException' which is a subclass of 'java.io.IOException'.(ߝ \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 b/.idea/sonarlint/issuestore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 deleted file mode 100644 index 8bbf20cb..00000000 --- a/.idea/sonarlint/issuestore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 +++ /dev/null @@ -1,9 +0,0 @@ - -X -java:S6208"CMerge the previous cases into this one using comma-separated label.(ժ -^ -java:S6208^"CMerge the previous cases into this one using comma-separated label.( -U -java:S1118":Add a private constructor to hide the implicit public one.(彳 -h -java:S6204"RReplace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()'( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 b/.idea/sonarlint/issuestore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/issuestore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 b/.idea/sonarlint/issuestore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/issuestore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 b/.idea/sonarlint/issuestore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/issuestore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 b/.idea/sonarlint/issuestore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 deleted file mode 100644 index 1daf3d98..00000000 --- a/.idea/sonarlint/issuestore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 +++ /dev/null @@ -1,5 +0,0 @@ - -y -java:S3415"VSwap these 2 arguments so they are in the correct order: expected value, actual value.(Ɔ8ʡ1 -y -java:S3415"VSwap these 2 arguments so they are in the correct order: expected value, actual value.(Ɔ8ʡ1 \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f b/.idea/sonarlint/issuestore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f deleted file mode 100644 index bed362b0..00000000 --- a/.idea/sonarlint/issuestore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f +++ /dev/null @@ -1,5 +0,0 @@ - -B -java:S3599",Use another way to initialize this instance.( -t -java:S1171"YMove the contents of this initializer to a standard constructor or to field initializers.( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 b/.idea/sonarlint/issuestore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 deleted file mode 100644 index ffc83dab..00000000 --- a/.idea/sonarlint/issuestore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 +++ /dev/null @@ -1,7 +0,0 @@ - -J -java:S3740b"/Provide the parametrized type for this generic.( -X -java:S6208q"CMerge the previous cases into this one using comma-separated label.(} -y -java:S6204R"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e b/.idea/sonarlint/issuestore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e deleted file mode 100644 index 71b94e8b..00000000 --- a/.idea/sonarlint/issuestore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e +++ /dev/null @@ -1,77 +0,0 @@ - -h java:S112"FDefine and throw a dedicated exception instead of using a generic one.(҂81 -h java:S112"FDefine and throw a dedicated exception instead of using a generic one.(81 -` -java:S6208"CMerge the previous cases into this one using comma-separated label.(Q81 -a -java:S6208"CMerge the previous cases into this one using comma-separated label.(ҭ81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(Ҙ81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(ψ81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(—81 -a -java:S6208"CMerge the previous cases into this one using comma-separated label.(81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(81 -` -java:S6208"CMerge the previous cases into this one using comma-separated label.(Q81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(֫81 -a -java:S6208"CMerge the previous cases into this one using comma-separated label.(81 -a -java:S6208"CMerge the previous cases into this one using comma-separated label.(ҭ81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(Ҙ81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(ψ81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(—81 -a -java:S6208"CMerge the previous cases into this one using comma-separated label.(81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(81 -` -java:S6208"CMerge the previous cases into this one using comma-separated label.(Q81 -f -java:S6208"CMerge the previous cases into this one using comma-separated label.(֫81 -a -java:S6208"CMerge the previous cases into this one using comma-separated label.(81 -a -java:S6208"CMerge the previous cases into this one using comma-separated label.(81 -a -java:S6208"CMerge the previous cases into this one using comma-separated label.(81 -d -java:S1192"GDefine a constant instead of duplicating this literal "NOT IN" 3 times.(Q81 -j -java:S1192"GDefine a constant instead of duplicating this literal "NOT_IN" 3 times.(81 -k -java:S1192"HDefine a constant instead of duplicating this literal "::jsonb" 3 times.(81 -b -java:S2583"DChange this condition so that it does not always evaluate to "false"(81 -: -java:S2386."Make this member "protected".(ٲ޺81 -` -java:S1155j">Use isEmpty() to check whether the collection is empty or not.(81 -{ -java:S6204"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'(881 -s -java:S1612"UReplace this lambda with method reference 'PostgresUtils::wrapAliasWithDoubleQuotes'.(81 -u -java:S3776"RRefactor this method to reduce its Cognitive Complexity from 24 to the 15 allowed.(81 -U -java:S1135"2Complete the task associated to this TODO comment.(81 -U -java:S1135"2Complete the task associated to this TODO comment.(81 -h -java:S6201"JReplace this instanceof check and cast with 'instanceof Document document'(81 -U -java:S1135"2Complete the task associated to this TODO comment.(81 -O -java:S3599",Use another way to initialize this instance.(81 -| -java:S1171"YMove the contents of this initializer to a standard constructor or to field initializers.(81 -_ -java:S1126"AReplace this if-then-else statement by a single return statement.(81 \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 b/.idea/sonarlint/issuestore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 deleted file mode 100644 index 4a983d58..00000000 --- a/.idea/sonarlint/issuestore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 +++ /dev/null @@ -1,555 +0,0 @@ - -\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.(ꛬ -a java:S112 "FDefine and throw a dedicated exception instead of using a generic one.( -a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(ܺ -a java:S112"FDefine and throw a dedicated exception instead of using a generic one.( -a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(ğ -\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.(߬ -\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.( -\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.( -F -java:S3740 "/Provide the parametrized type for this generic.( -F -java:S3740"/Provide the parametrized type for this generic.( -K -java:S3740"/Provide the parametrized type for this generic.( -u -java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").( -n -java:S1192"RDefine a constant instead of duplicating this literal "\"name\":\"abc5\"" 5 times.( - -java:S1192"nDefine a constant instead of duplicating this literal "\"FQN\":{\"value\":{\"string\":\"driver\"}}}," 7 times.( -c -java:S1192"GDefine a constant instead of duplicating this literal "score" 16 times.(¡ -b -java:S1192"LDefine a constant instead of duplicating this literal "subDocPath1" 4 times.(əd -h -java:S1192"LDefine a constant instead of duplicating this literal "subDocPath2" 3 times.(ٟ -a -java:S1192"JDefine a constant instead of duplicating this literal "bangalore" 3 times.(Ǭ - -java:S1192"dDefine a constant instead of duplicating this literal "attributes.labels.valueList.values" 11 times.(ة -c -java:S1192"GDefine a constant instead of duplicating this literal "subdoc" 9 times.( -l -java:S1192"PDefine a constant instead of duplicating this literal "bob@example.com" 4 times.(ڀ -_ -java:S1192"HDefine a constant instead of duplicating this literal "labels" 29 times.(Ǩ -^ -java:S1192"GDefine a constant instead of duplicating this literal "field" 11 times.(㐙 -g -java:S1192"KDefine a constant instead of duplicating this literal "nestedkey1" 6 times.(Ϗ -n -java:S1192"RDefine a constant instead of duplicating this literal "\"name\":\"abc4\"" 4 times.( - -java:S1192"Define a constant instead of duplicating this literal "\"entityId\":\"e3ffc6f0-fc92-3a9c-9fa0-26269184d1aa\",\"entityName\":\"driver\"," 7 times.(ӌ -a -java:S1192"JDefine a constant instead of duplicating this literal "products" 10 times.( -` -java:S1192"JDefine a constant instead of duplicating this literal "default" 124 times.( -^ -java:S1192"HDefine a constant instead of duplicating this literal "testKey" 9 times.( -b -java:S1192"FDefine a constant instead of duplicating this literal "email" 4 times.(ڀ -_ -java:S1192Y"IDefine a constant instead of duplicating this literal "postgres" 4 times.(ۡω -a -java:S1192"KDefine a constant instead of duplicating this literal "timestamp" 10 times.(əd -e -java:S1192"IDefine a constant instead of duplicating this literal "product" 18 times.(¡ -h -java:S1192"LDefine a constant instead of duplicating this literal "attributes" 47 times.( -i -java:S1192"RDefine a constant instead of duplicating this literal "\"name\":\"abc3\"" 4 times.( -f -java:S1192"JDefine a constant instead of duplicating this literal "isCostly" 29 times.( - -java:S1192"Define a constant instead of duplicating this literal "\"entityType\":\"SERVICE\",\"identifyingAttributes\":{\"FQN\":{\"value\":{\"string" 7 times.( -j -java:S1192"NDefine a constant instead of duplicating this literal "malformedJson" 3 times.( -n -java:S1192"RDefine a constant instead of duplicating this literal "\"key1\":\"abc1\"" 4 times.(넠 -b -java:S1192"FDefine a constant instead of duplicating this literal "Alice" 8 times.( - -java:S1192"mDefine a constant instead of duplicating this literal "\":\"driver\"}}},\"tenantId\":\"__default\"}" 7 times.(舂 - -java:S1192"{Define a constant instead of duplicating this literal "\"span_id\":{\"value\":{\"string\":\"6449f1f720c93a67\"}}," 6 times.( -i -java:S1192"RDefine a constant instead of duplicating this literal "\"key1\":\"abc4\"" 4 times.(چ -d -java:S1192"HDefine a constant instead of duplicating this literal "string" 63 times.( -b -java:S1192"FDefine a constant instead of duplicating this literal "color" 6 times.( -f -java:S1192"JDefine a constant instead of duplicating this literal "testKey2" 50 times.( -f -java:S1192"JDefine a constant instead of duplicating this literal "testKey1" 81 times.( -a -java:S1192"JDefine a constant instead of duplicating this literal "testKey4" 39 times.(ˌ -_ -java:S1192"HDefine a constant instead of duplicating this literal "values" 29 times.( -f -java:S1192"JDefine a constant instead of duplicating this literal "testKey3" 45 times.( -e -java:S1192"IDefine a constant instead of duplicating this literal "testKey6" 4 times.( -a -java:S1192"JDefine a constant instead of duplicating this literal "testKey5" 11 times.( -f -java:S1192"JDefine a constant instead of duplicating this literal "tenant-1" 10 times.( -^ -java:S1192"GDefine a constant instead of duplicating this literal "value" 74 times.(㐙 -^ -java:S1192"GDefine a constant instead of duplicating this literal "amount" 4 times.(ꓦ -d -java:S1192"HDefine a constant instead of duplicating this literal "Label1" 20 times.( -d -java:S1192"HDefine a constant instead of duplicating this literal "Label3" 21 times.( -d -java:S1192"HDefine a constant instead of duplicating this literal "Label2" 22 times.(Պ - -java:S1192"~Define a constant instead of duplicating this literal "\"service_type\":{\"value\":{\"string\":\"JAEGER_SERVICE\"}}," 7 times.(Ո - -java:S1192"sDefine a constant instead of duplicating this literal "\"string\":\"00000000000000005e194fdf9fbf5101\"}}," 4 times.(Ξ -b -java:S1192"KDefine a constant instead of duplicating this literal "valueList" 29 times.(肒 -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -I -java:S1199"-Extract this nested code block into a method.( -i -java:S2095J"NUse try-with-resources or close this "GenericContainer" in a "finally" clause.(ǎ -i -java:S2095X"NUse try-with-resources or close this "GenericContainer" in a "finally" clause.( -J -java:S1874T"4Remove this use of "getDatastore"; it is deprecated.(Ǚ -E java:S106U"+Replace this use of System.out by a logger.( -J -java:S1874g"4Remove this use of "getDatastore"; it is deprecated.( -E java:S106h"+Replace this use of System.out by a logger.( -^ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -^ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ո -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(鈞 -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(朿 -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(˂ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ȗ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -A java:S106"+Replace this use of System.out by a logger.(҇ -W java:S125"Use isEmpty() to check whether the collection is empty or not.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(Ժ -i java:S100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -i java:S100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -Q -java:S1612":Replace this lambda with method reference 'Thread::start'.( -z -java:S2142"^Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.( -H -java:S3599",Use another way to initialize this instance.( -u -java:S1171"YMove the contents of this initializer to a standard constructor or to field initializers.( -K -java:S1172"4Remove this unused method parameter "dataStoreName".( -K -java:S1172"4Remove this unused method parameter "dataStoreName".( -B -java:S5960"+Remove this assertion from production code.(㫈 -P -java:S1144"4Remove this unused private "assertSizeEqual" method.(Ҽ \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 b/.idea/sonarlint/issuestore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 deleted file mode 100644 index 9a491e48..00000000 --- a/.idea/sonarlint/issuestore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 +++ /dev/null @@ -1,292 +0,0 @@ - -a java:S112"FDefine and throw a dedicated exception instead of using a generic one.( -\ java:S112"FDefine and throw a dedicated exception instead of using a generic one.(͘ -a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(˺ -a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(ɂ - -java:S1192"uDefine a constant instead of duplicating this literal "\"name\":\"X-Content-Type-Options without nosniff\"," 3 times.(⋲ -f -java:S1192"JDefine a constant instead of duplicating this literal "ENTITY_ID" 3 times.( -w -java:S1192"`Define a constant instead of duplicating this literal "\"environment\":\"cluster001\"," 3 times.( -^ -java:S1192"GDefine a constant instead of duplicating this literal "Bottle" 6 times.( - -java:S1192"Define a constant instead of duplicating this literal "\"type\":\"VULNERABILITY_TYPE_MISSING_NOSNIFF_IN_CONTENT_TYPE_OPTIONS_HEADER\"," 3 times.(Ա -^ -java:S1192"GDefine a constant instead of duplicating this literal "price" 74 times.( -a -java:S1192"JDefine a constant instead of duplicating this literal "new_value" 3 times.( -j -java:S1192"NDefine a constant instead of duplicating this literal "props.planets" 4 times.(؂ -e -java:S1192"NDefine a constant instead of duplicating this literal "sales.medium" 19 times.( -c -java:S1192"GDefine a constant instead of duplicating this literal "props" 19 times.( -~ -java:S1192"gDefine a constant instead of duplicating this literal "\"detection_timestamp\":1663312992746," 3 times.(Ŧ -| -java:S1192"eDefine a constant instead of duplicating this literal "e2e7f827-7ea5-5a5f-b547-d737965e4e58" 3 times.(ًا - -java:S1192"fDefine a constant instead of duplicating this literal "query/updatable_collection_data.json" 18 times.( -| -java:S1192"`Define a constant instead of duplicating this literal "\"entity_name\":\"POST/login\"," 3 times.(Ѣ -w -java:S1192"[Define a constant instead of duplicating this literal "query/collection_data.json" 6 times.( - -java:S1192"fDefine a constant instead of duplicating this literal "query/not_exists_filter_response.json" 4 times.( -d -java:S1192"NDefine a constant instead of duplicating this literal "VULNERABILITY" 3 times.(5 -b -java:S1192"KDefine a constant instead of duplicating this literal "props.size" 3 times.( -t -java:S1192"XDefine a constant instead of duplicating this literal "query/sum_response.json" 4 times.( -~ -java:S1192"bDefine a constant instead of duplicating this literal "query/exists_filter_response.json" 4 times.(ߔ -m -java:S1192"VDefine a constant instead of duplicating this literal "2022-08-09T18:53:17Z" 14 times.(۝ - -java:S1192"yDefine a constant instead of duplicating this literal "\"service_id\":\"8d64ccfb-ad07-3a3c-bc32-740f1c794b7d\"," 3 times.(˺ -s -java:S1192"\Define a constant instead of duplicating this literal "\"type\":\"VULNERABILITY\"," 3 times.(ɃҴ -` -java:S1192"IDefine a constant instead of duplicating this literal "postgres" 4 times.(ۡω -v -java:S1192"ZDefine a constant instead of duplicating this literal "props.seller.address.city" 3 times.(͖ -k -java:S1192"TDefine a constant instead of duplicating this literal "props.appended.list" 4 times.( -g -java:S1192"PDefine a constant instead of duplicating this literal "num_items.value" 3 times.(ߢ -q -java:S1192"ZDefine a constant instead of duplicating this literal "{\"json\": \"new_value\"}" 6 times.(򈲰 -_ -java:S1192"IDefine a constant instead of duplicating this literal "tenantId" 3 times.( - -java:S1192"rDefine a constant instead of duplicating this literal "\"_id\":\"e2e7f827-7ea5-5a5f-b547-d737965e4e58\"," 3 times.(܍ -y -java:S1192"bDefine a constant instead of duplicating this literal "query/simple_filter_response.json" 4 times.(ͣ -a -java:S1192"KDefine a constant instead of duplicating this literal "quantities" 4 times.( -x -java:S1192"\Define a constant instead of duplicating this literal "\"identifyingAttributes\":{" 3 times.( -v -java:S1192"_Define a constant instead of duplicating this literal "query/key_filter_response.json" 5 times.( -g -java:S1192"PDefine a constant instead of duplicating this literal "\"attributes\":" 3 times.(⴨ -g -java:S1192"PDefine a constant instead of duplicating this literal "props.added.set" 4 times.(Ɛ -q -java:S1192"UDefine a constant instead of duplicating this literal "\"status\":\"OPEN\"," 3 times.( -\ -java:S1192"FDefine a constant instead of duplicating this literal "Pluto" 5 times.(H -^ -java:S1192"GDefine a constant instead of duplicating this literal "sales" 19 times.( -c -java:S1192"GDefine a constant instead of duplicating this literal "STATUS" 3 times.( -b -java:S1192"KDefine a constant instead of duplicating this literal "qty_count" 16 times.(ˉ -q -java:S1192"UDefine a constant instead of duplicating this literal "attributes.entity_id" 3 times.( -l -java:S1192"PDefine a constant instead of duplicating this literal "\"tenantId\":\"" 3 times.(̽ - -java:S1192"lDefine a constant instead of duplicating this literal "\"status_update_timestamp\":1663312992746}," 3 times.(Ͻ - -java:S1192"eDefine a constant instead of duplicating this literal "props.new_property.deep.nested.value" 7 times.(Ꞁ -p -java:S1192"TDefine a constant instead of duplicating this literal "sales.medium.volume" 4 times.(ƻ -m -java:S1192"QDefine a constant instead of duplicating this literal "props.added.list" 6 times.(Ы -] -java:S1192"FDefine a constant instead of duplicating this literal "count" 7 times.(񹠫 -{ -java:S1192"_Define a constant instead of duplicating this literal "props.new_property.deep.nested" 3 times.( - -java:S1192"yDefine a constant instead of duplicating this literal "\"entity_id\":\"79d2ffc4-38a6-376f-a57f-89893f0acb5b\"}}" 3 times.(Ž -^ -java:S1192"GDefine a constant instead of duplicating this literal "Dettol" 6 times.( -d -java:S1192 -"MDefine a constant instead of duplicating this literal "props.colors" 4 times.(ʔٰ - -java:S1192"xDefine a constant instead of duplicating this literal "\"entity_id\":\"79d2ffc4-38a6-376f-a57f-89893f0acb5b\"," 3 times.( -c -java:S1192"LDefine a constant instead of duplicating this literal "sales.city" 16 times.( -u -java:S1192"YDefine a constant instead of duplicating this literal "\"entity_type\":\"API\"," 3 times.(翟 -l -java:S1192"UDefine a constant instead of duplicating this literal "\"nginx-traceshop\"," 3 times.(ɇ -c -java:S1192"GDefine a constant instead of duplicating this literal "Mirror" 5 times.(혾 -~ -java:S1192"gDefine a constant instead of duplicating this literal "\"is_external\":true,\"service_name\":" 3 times.( - -java:S1192"vDefine a constant instead of duplicating this literal "{\"name\":\"X-Content-Type-Options without nosniff\"," 3 times.(± -c -java:S1192"GDefine a constant instead of duplicating this literal "total" 11 times.(䉔 - -java:S1192"rDefine a constant instead of duplicating this literal "{\"id\":\"e2e7f827-7ea5-5a5f-b547-d737965e4e58\"," 3 times.( - -java:S1192"wDefine a constant instead of duplicating this literal "query/filter_with_sorting_and_pagination_response.json" 3 times.( -f -java:S1192"JDefine a constant instead of duplicating this literal "quantity" 65 times.( -o -java:S1192"SDefine a constant instead of duplicating this literal "sales.medium.type" 16 times.( -d -java:S1192"HDefine a constant instead of duplicating this literal "Shampoo" 5 times.(혾 -s -java:S1192"WDefine a constant instead of duplicating this literal "\"severity\":\"HIGH\"," 3 times.( -q -java:S1192"ZDefine a constant instead of duplicating this literal "query/count_response.json" 4 times.(Ԗ -n -java:S1192"RDefine a constant instead of duplicating this literal "attributes.status" 3 times.( -i -java:S1192"MDefine a constant instead of duplicating this literal "props.brand" 12 times.( - -java:S1192"rDefine a constant instead of duplicating this literal "query/test_functional_lhs_in_filter_response.json" 4 times.( -t -java:S1192"]Define a constant instead of duplicating this literal "props.seller.address.pincode" 3 times.( -i -java:S1192"RDefine a constant instead of duplicating this literal "props.seller.name" 4 times.( -l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(u -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ܼ -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ߺ -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< -f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ѷ -f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< -l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(u -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ܼ -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ߺ -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -g java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< -l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< -l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǧ< -l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(督 -l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ؾ -l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -j -java:S2095"NUse try-with-resources or close this "GenericContainer" in a "finally" clause.( -i -java:S2095"NUse try-with-resources or close this "GenericContainer" in a "finally" clause.(ǎ -o -java:S3655"XCall "doc2Optional.isPresent()" or "!doc2Optional.isEmpty()" before accessing the value.( -t -java:S3655"XCall "doc1Optional.isPresent()" or "!doc1Optional.isEmpty()" before accessing the value.( -o -java:S3655"XCall "doc2Optional.isPresent()" or "!doc2Optional.isEmpty()" before accessing the value.( -o -java:S3655"XCall "doc2Optional.isPresent()" or "!doc2Optional.isEmpty()" before accessing the value.( -t -java:S3655"XCall "doc1Optional.isPresent()" or "!doc1Optional.isEmpty()" before accessing the value.( -t -java:S3655"XCall "doc1Optional.isPresent()" or "!doc1Optional.isEmpty()" before accessing the value.( -o -java:S3655"XCall "doc2Optional.isPresent()" or "!doc2Optional.isEmpty()" before accessing the value.( -t -java:S3655"XCall "doc1Optional.isPresent()" or "!doc1Optional.isEmpty()" before accessing the value.( -K -java:S1874"4Remove this use of "getDatastore"; it is deprecated.(Ǚ -F java:S106"+Replace this use of System.out by a logger.( -K -java:S1874"4Remove this use of "getDatastore"; it is deprecated.( -F java:S106"+Replace this use of System.out by a logger.( -H -java:S3985"1Remove this unused private "MongoProvider" class.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(ǣ -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -d java:S100 -"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(֒ -i java:S100 "NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -i java:S100 "NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(̐ -d -java:S5738 "HRemove this call to a deprecated method, it has been marked for removal.(ǣ -5 -java:S2119"Save and re-use this "Random".( -u -java:S6204"^Replace this usage of 'Stream.collect(Collectors.toUnmodifiableList())' with 'Stream.toList()'( -5 -java:S2119"Save and re-use this "Random".( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(͎ -5 -java:S2119"Save and re-use this "Random".( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(϶ -5 -java:S2119"Save and re-use this "Random".( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(϶ -5 -java:S2119"Save and re-use this "Random".( -_ -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.(϶ -5 -java:S2119"Save and re-use this "Random".( -d -java:S5738"HRemove this call to a deprecated method, it has been marked for removal.( -S -java:S1854"Use isEmpty() to check whether the collection is empty or not.( -] -java:S5738"FDon't override this deprecated method, it has been marked for removal.( -o -java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ɮ -5 -java:S3457"2nd argument is not used.(獰 -b -java:S5738"FDon't override this deprecated method, it has been marked for removal.( -R -java:S1172"6Remove this unused method parameter "idToTenantIdMap".( -R -java:S1172"6Remove this unused method parameter "idToTenantIdMap".( -R -java:S1172"6Remove this unused method parameter "idToTenantIdMap".( -i -java:S6204"RReplace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()'(ҳ -o -java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ɮ -t -java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ԧ˦ -o -java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ɮ -o -java:S2139"XEither log this exception and handle it, or rethrow it with some contextual information.(ﭣ -g java:S116 "QRename this field "MAPPER" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( -e -java:S2272 -"NAdd a "NoSuchElementException" for iteration beyond the end of the collection.( -W -java:S3398 -";Move this method into "PostgresResultIteratorWithMetaData".( \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/f/9/f91503f99719558ba609448495d024217530b19e b/.idea/sonarlint/issuestore/f/9/f91503f99719558ba609448495d024217530b19e deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/issuestore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 b/.idea/sonarlint/issuestore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb deleted file mode 100644 index e97fe460..00000000 --- a/.idea/sonarlint/issuestore/index.pb +++ /dev/null @@ -1,45 +0,0 @@ - - -bdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/operators/SortOrder.java,c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 - -fdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/type/FromTypeExpression.java,8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 - -Pdocument-store/src/main/java/org/hypertrace/core/documentstore/query/Filter.java,d/1/d107e4c530045df456683e6f437cfe2843045178 - -hdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/type/FilterTypeExpression.java,8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 - -Zdocument-store/src/integrationTest/java/org/hypertrace/core/documentstore/utils/Utils.java,c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 - -tdocument-store/src/main/java/org/hypertrace/core/documentstore/mongo/query/parser/MongoSortTypeExpressionParser.java,a/1/a1288cdc106e20724b8729bee339d7fa78a9096f - -bdocument-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java,b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 - -Zdocument-store/src/main/java/org/hypertrace/core/documentstore/mongo/MongoQueryParser.java,6/b/6b7749b677774a72e32ce7b9c682307ace86b109 - -adocument-store/src/main/java/org/hypertrace/core/documentstore/expression/impl/KeyExpression.java,3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c -} -Mdocument-store/src/main/java/org/hypertrace/core/documentstore/Datastore.java,3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b - -qdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/update/parser/PostgresAddValueParser.java,f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 - -document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresDataAccessorIdentifierExpressionVisitor.java,d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 - -document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresAggregationFilterTypeExpressionVisitor.java,f/9/f91503f99719558ba609448495d024217530b19e - -document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresFilterTypeExpressionVisitor.java,a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 -~ -Ndocument-store/src/main/java/org/hypertrace/core/documentstore/Collection.java,4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 - -rdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/subdoc/PostgresSubDocumentValueParser.java,8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 - -[document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java,b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 - -_document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresCollection.java,d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd - -bdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresQueryExecutor.java,2/5/2561871d99d8992bf90d0882349a013391cf0715 - -ddocument-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java,9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 - -`document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParser.java,1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad - -`document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java,b/4/b46ca719b34162ed593babf2bae7216774cbf02e \ No newline at end of file diff --git a/.idea/sonarlint/securityhotspotstore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad b/.idea/sonarlint/securityhotspotstore/1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/2/5/2561871d99d8992bf90d0882349a013391cf0715 b/.idea/sonarlint/securityhotspotstore/2/5/2561871d99d8992bf90d0882349a013391cf0715 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b b/.idea/sonarlint/securityhotspotstore/3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c b/.idea/sonarlint/securityhotspotstore/3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 b/.idea/sonarlint/securityhotspotstore/4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 b/.idea/sonarlint/securityhotspotstore/6/b/6b7749b677774a72e32ce7b9c682307ace86b109 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 b/.idea/sonarlint/securityhotspotstore/8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 b/.idea/sonarlint/securityhotspotstore/8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 b/.idea/sonarlint/securityhotspotstore/8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 b/.idea/sonarlint/securityhotspotstore/9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f b/.idea/sonarlint/securityhotspotstore/a/1/a1288cdc106e20724b8729bee339d7fa78a9096f deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 b/.idea/sonarlint/securityhotspotstore/a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e b/.idea/sonarlint/securityhotspotstore/b/4/b46ca719b34162ed593babf2bae7216774cbf02e deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 b/.idea/sonarlint/securityhotspotstore/b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 b/.idea/sonarlint/securityhotspotstore/b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 b/.idea/sonarlint/securityhotspotstore/c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 b/.idea/sonarlint/securityhotspotstore/c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/d/1/d107e4c530045df456683e6f437cfe2843045178 b/.idea/sonarlint/securityhotspotstore/d/1/d107e4c530045df456683e6f437cfe2843045178 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 b/.idea/sonarlint/securityhotspotstore/d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd b/.idea/sonarlint/securityhotspotstore/d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/f/9/f91503f99719558ba609448495d024217530b19e b/.idea/sonarlint/securityhotspotstore/f/9/f91503f99719558ba609448495d024217530b19e deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 b/.idea/sonarlint/securityhotspotstore/f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/securityhotspotstore/index.pb b/.idea/sonarlint/securityhotspotstore/index.pb deleted file mode 100644 index 19c36956..00000000 --- a/.idea/sonarlint/securityhotspotstore/index.pb +++ /dev/null @@ -1,45 +0,0 @@ - - -bdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/operators/SortOrder.java,c/f/cf4fbd1b523922d2b3b9712239a8da1a9b24dec1 - -tdocument-store/src/main/java/org/hypertrace/core/documentstore/mongo/query/parser/MongoSortTypeExpressionParser.java,a/1/a1288cdc106e20724b8729bee339d7fa78a9096f - -fdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/type/FromTypeExpression.java,8/0/808dbf2dad3b587591c985b04f47edef3aa70f39 - -Pdocument-store/src/main/java/org/hypertrace/core/documentstore/query/Filter.java,d/1/d107e4c530045df456683e6f437cfe2843045178 - -hdocument-store/src/main/java/org/hypertrace/core/documentstore/expression/type/FilterTypeExpression.java,8/9/892f9aabd92368a512b67dfa0f13a3c680de2bc9 - -Zdocument-store/src/integrationTest/java/org/hypertrace/core/documentstore/utils/Utils.java,c/f/cfd44c5cdcf2c5a7f2d060f14f94998e05eedb10 - -bdocument-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java,b/e/bee4e4b944ea58987b2d54eb48db85ad115ea816 - -Zdocument-store/src/main/java/org/hypertrace/core/documentstore/mongo/MongoQueryParser.java,6/b/6b7749b677774a72e32ce7b9c682307ace86b109 - -adocument-store/src/main/java/org/hypertrace/core/documentstore/expression/impl/KeyExpression.java,3/a/3ae56ecec9105e9bb7b92cc2b4e515de5c5e4c1c - -rdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/subdoc/PostgresSubDocumentValueParser.java,8/c/8c4f975c761608a98ae79efe6ffc3345c1391bc4 -} -Mdocument-store/src/main/java/org/hypertrace/core/documentstore/Datastore.java,3/6/36dfb66c4a4b77c09d4bd5e8eb08f68745e1b20b - -qdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/update/parser/PostgresAddValueParser.java,f/b/fb727c1802818d51fdf42b1d16818caa3dbe2b56 - -document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresDataAccessorIdentifierExpressionVisitor.java,d/2/d283e3b881e061fef91cc43c55bc7d85f6bb1a40 - -document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresAggregationFilterTypeExpressionVisitor.java,f/9/f91503f99719558ba609448495d024217530b19e - -document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresFilterTypeExpressionVisitor.java,a/7/a73cae39c74764efaf08d760ed3e5a42aea37ca2 -~ -Ndocument-store/src/main/java/org/hypertrace/core/documentstore/Collection.java,4/a/4aecbb16ba4e3304076fc83f8ca6dc3b7d046007 - -[document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java,b/b/bb9c38f9f1684753821ef3b801caeadc8c820f34 - -`document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParser.java,1/a/1a9bdbfaccb9672e42866cddd17df4f64d68fbad - -_document-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresCollection.java,d/a/dad440cf2f4cb51473cf2b69b197f7ab9ea47bdd - -bdocument-store/src/main/java/org/hypertrace/core/documentstore/postgres/PostgresQueryExecutor.java,2/5/2561871d99d8992bf90d0882349a013391cf0715 - -ddocument-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java,9/3/93ab4a3b5f8fdeddfb4cb9f216c3ad668d2eab36 - -`document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java,b/4/b46ca719b34162ed593babf2bae7216774cbf02e \ No newline at end of file From 830914ae86d03191f70eb2ee9e5bb75d05e7c809 Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Wed, 6 Dec 2023 20:04:26 +0530 Subject: [PATCH 4/9] fix --- .../core/documentstore/DocStoreTest.java | 1 - .../postgres/utils/PostgresUtils.java | 21 ++++++++++++------- .../postgres/PostgresQueryParserTest.java | 19 +++++++++++------ 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java index 38273c2e..f72d567e 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java @@ -666,7 +666,6 @@ public void testSubDocumentUpdate(String dataStoreName) throws IOException { // postgres // {"foo1":"bar1","subdoc":{"subfoo1":"subbar1","nesteddoc":{"nestedfoo1":"nestedbar1"}}, // "created_at":"2021-03-15 00:24:50.981147","updated_at":"2021-03-15 00:24:50.981147"} - System.out.println(documents.get(0).toJson()); ObjectNode jsonNode = (ObjectNode) OBJECT_MAPPER.readTree(documents.get(0).toJson()); String expected = "{\"foo1\":\"bar1\",\"subdoc\":{\"subfoo1\":\"subbar1\"," diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java index 7567affb..808ccead 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java @@ -184,14 +184,15 @@ public static String prepareParameterizedStringForJsonList( public static String parseNonCompositeFilterWithCasting( String fieldName, String columnName, String op, Object value, Builder paramsBuilder) { - String parsedExpression = - prepareCast(prepareFieldDataAccessorExpr(fieldName, columnName), value); + String parsedExpression; if (isInOp(op)) { + parsedExpression = + prepareCast(prepareFieldAccessorExpr(fieldName, columnName).toString(), value); if (isFirstClassColumn(parsedExpression)) { parsedExpression = "to_jsonb(" + parsedExpression + ")"; - } else { - parsedExpression = parsedExpression.replace("->>", "->"); } + } else { + parsedExpression = prepareCast(prepareFieldDataAccessorExpr(fieldName, columnName), value); } return parseNonCompositeFilter( fieldName, parsedExpression, columnName, op, value, paramsBuilder); @@ -365,10 +366,14 @@ public static String parseNonCompositeFilter( throw new UnsupportedOperationException(UNSUPPORTED_QUERY_OPERATION); } - if (!isInOP) { - filterString.append(sqlOperator); + // final filter string has already been built for in operators + if (isInOP) { + return filterString.toString(); } - if (value != null && !isInOP) { + + filterString.append(sqlOperator); + + if (value != null) { if (isMultiValued) { filterString.append(value); } else if (isContainsOp) { @@ -392,7 +397,7 @@ private static StringBuilder prepareFilterStringForInOperator( .map( val -> { paramsBuilder.addObjectParam(val); - return parsedExpression + " ?? ?"; + return "(jsonb_build_array(" + parsedExpression + ") @> jsonb_build_array(?))"; }) .collect(Collectors.joining(" OR ")); filterStringBuilder.append(collect); diff --git a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java index fe1f33ce..b3d774b2 100644 --- a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java +++ b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java @@ -110,7 +110,9 @@ void testParseNonCompositeFilter() { filter.getOp().toString(), filter.getValue(), initParams()); - Assertions.assertEquals("(to_jsonb(" + ID + ") ?? ? OR to_jsonb(" + ID + ") ?? ?)", query); + Assertions.assertEquals( + "((jsonb_build_array(to_jsonb(id)) @> jsonb_build_array(?)) OR (jsonb_build_array(to_jsonb(id)) @> jsonb_build_array(?)))", + query); } { @@ -122,7 +124,7 @@ void testParseNonCompositeFilter() { filter.getOp().toString(), filter.getValue(), initParams()); - Assertions.assertEquals("(to_jsonb(" + ID + ") ?? ?)", query); + Assertions.assertEquals("((jsonb_build_array(to_jsonb(id)) @> jsonb_build_array(?)))", query); } } @@ -173,26 +175,31 @@ void testParseNonCompositeFilterForJsonField() { { Filter filter = new Filter(Filter.Op.IN, "key1", List.of("abc")); String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals("(document->'key1' ?? ?)", query); + Assertions.assertEquals( + "((jsonb_build_array(document->'key1') @> jsonb_build_array(?)))", query); } { Filter filter = new Filter(Filter.Op.IN, "key1", List.of("abc", "xyz")); String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals("(document->'key1' ?? ? OR document->'key1' ?? ?)", query); + Assertions.assertEquals( + "((jsonb_build_array(document->'key1') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'key1') @> jsonb_build_array(?)))", + query); } { Filter filter = new Filter(Op.NOT_IN, "key1", List.of("abc")); String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals("document->'key1' IS NULL OR NOT (document->'key1' ?? ?)", query); + Assertions.assertEquals( + "document->'key1' IS NULL OR NOT ((jsonb_build_array(document->'key1') @> jsonb_build_array(?)))", + query); } { Filter filter = new Filter(Op.NOT_IN, "key1", List.of("abc", "xyz")); String query = PostgresQueryParser.parseFilter(filter, initParams()); Assertions.assertEquals( - "document->'key1' IS NULL OR NOT (document->'key1' ?? ? OR document->'key1' ?? ?)", + "document->'key1' IS NULL OR NOT ((jsonb_build_array(document->'key1') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'key1') @> jsonb_build_array(?)))", query); } From 7b4f834241028dad68600d7319cb6b776ffd23b8 Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Fri, 8 Dec 2023 18:33:51 +0530 Subject: [PATCH 5/9] fix new flow --- .../postgres/utils/PostgresUtils.java | 18 ++++++++++++++++-- .../query/v1/PostgresQueryParserTest.java | 6 +++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java index 808ccead..2d2e1bcf 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java @@ -454,6 +454,7 @@ public static String prepareParsedNonCompositeFilter( String sqlOperator; boolean isMultiValued = false; boolean isContainsOp = false; + boolean isInOP = false; switch (op) { case "EQ": case "=": @@ -487,13 +488,22 @@ public static String prepareParsedNonCompositeFilter( // NOTE: Pl. refer this in non-parsed expression for limitation of this filter sqlOperator = " NOT IN "; isMultiValued = true; - value = prepareParameterizedStringForList((Iterable) value, paramsBuilder); + isInOP = true; + filterString + .append(" IS NULL OR") + .append(" NOT ") + .append( + prepareFilterStringForInOperator( + preparedExpression, (Iterable) value, paramsBuilder)); break; case "IN": // NOTE: Pl. refer this in non-parsed expression for limitation of this filter sqlOperator = " IN "; isMultiValued = true; - value = prepareParameterizedStringForList((Iterable) value, paramsBuilder); + isInOP = true; + filterString = + prepareFilterStringForInOperator( + preparedExpression, (Iterable) value, paramsBuilder); break; case "NOT_EXISTS": case "NOT EXISTS": @@ -531,6 +541,10 @@ public static String prepareParsedNonCompositeFilter( throw new UnsupportedOperationException(UNSUPPORTED_QUERY_OPERATION); } + if (isInOP) { + return filterString.toString(); + } + filterString.append(sqlOperator); if (value != null) { if (isMultiValued) { diff --git a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/PostgresQueryParserTest.java b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/PostgresQueryParserTest.java index b8b86475..e880dd3b 100644 --- a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/PostgresQueryParserTest.java +++ b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/PostgresQueryParserTest.java @@ -648,7 +648,7 @@ void testFindWithSortingAndPagination() { + "document->'quantity' AS \"quantity\", " + "document->'date' AS \"date\" " + "FROM \"testCollection\" " - + "WHERE document->>'item' IN (?, ?, ?, ?) " + + "WHERE ((jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?))) " + "ORDER BY document->'quantity' DESC NULLS LAST,document->'item' ASC NULLS FIRST " + "OFFSET ? LIMIT ?", sql); @@ -1121,7 +1121,7 @@ void testQueryQ1AggregationFilterWithStringInFilterAlongWithNonAliasFields() { "SELECT COUNT(DISTINCT document->>'quantity' ) AS \"qty_count\", " + "document->'item' AS \"item\", document->'price' AS \"price\" " + "FROM \"testCollection\" GROUP BY document->'item',document->'price' " - + "HAVING (COUNT(DISTINCT document->>'quantity' ) <= ?) AND (CAST (document->'item' AS TEXT) IN (?, ?, ?, ?))", + + "HAVING (COUNT(DISTINCT document->>'quantity' ) <= ?) AND (((jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?))))", sql); Params params = postgresQueryParser.getParamsBuilder().build(); @@ -1164,7 +1164,7 @@ void testQueryQ1DistinctCountAggregationWithOnlyFilter() { assertEquals( "SELECT COUNT(DISTINCT document->>'quantity' ) AS \"qty_count\" " + "FROM \"testCollection\" " - + "WHERE (CAST (document->>'price' AS NUMERIC) <= ?) AND (document->>'item' IN (?, ?, ?, ?))", + + "WHERE (CAST (document->>'price' AS NUMERIC) <= ?) AND (((jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?))))", sql); Params params = postgresQueryParser.getParamsBuilder().build(); From 629662c3a81f3767aef5af0c5306ae215a6aa938 Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Mon, 11 Dec 2023 16:30:48 +0530 Subject: [PATCH 6/9] remove old code flow changes --- .../postgres/utils/PostgresUtils.java | 50 +++---------------- .../postgres/PostgresQueryParserTest.java | 39 ++------------- 2 files changed, 10 insertions(+), 79 deletions(-) diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java index 2d2e1bcf..1c27ce95 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java @@ -90,10 +90,6 @@ public static String prepareFieldDataAccessorExpr(String fieldName, String colum return fieldPrefix.toString(); } - private static boolean isFirstClassColumn(String fieldName) { - return OUTER_COLUMNS.contains(fieldName) || DOCUMENT_COLUMN.equals(fieldName); - } - public static Type getType(Object value) { boolean isArrayType = false; Type type = Type.STRING; @@ -184,31 +180,12 @@ public static String prepareParameterizedStringForJsonList( public static String parseNonCompositeFilterWithCasting( String fieldName, String columnName, String op, Object value, Builder paramsBuilder) { - String parsedExpression; - if (isInOp(op)) { - parsedExpression = - prepareCast(prepareFieldAccessorExpr(fieldName, columnName).toString(), value); - if (isFirstClassColumn(parsedExpression)) { - parsedExpression = "to_jsonb(" + parsedExpression + ")"; - } - } else { - parsedExpression = prepareCast(prepareFieldDataAccessorExpr(fieldName, columnName), value); - } + String parsedExpression = + prepareCast(prepareFieldDataAccessorExpr(fieldName, columnName), value); return parseNonCompositeFilter( fieldName, parsedExpression, columnName, op, value, paramsBuilder); } - private static boolean isInOp(String op) { - switch (op) { - case "IN": - case "NOT_IN": - case "NOT IN": - return true; - default: - return false; - } - } - @SuppressWarnings("unchecked") public static String parseNonCompositeFilter( String fieldName, @@ -221,7 +198,6 @@ public static String parseNonCompositeFilter( String sqlOperator; boolean isMultiValued = false; boolean isContainsOp = false; - boolean isInOP = false; switch (op) { case "EQ": case "=": @@ -274,24 +250,18 @@ public static String parseNonCompositeFilter( // so, we need - "document->key IS NULL OR document->key->> NOT IN (v1, v2)" StringBuilder notInFilterString = prepareFieldAccessorExpr(fieldName, columnName); if (!OUTER_COLUMNS.contains(fieldName)) { - filterString = notInFilterString.append(" IS NULL OR"); + filterString = notInFilterString.append(" IS NULL OR ").append(parsedExpression); } sqlOperator = " NOT IN "; isMultiValued = true; - isInOP = true; - filterString - .append(" NOT ") - .append( - prepareFilterStringForInOperator( - parsedExpression, (Iterable) value, paramsBuilder)); + value = prepareParameterizedStringForList((Iterable) value, paramsBuilder); break; case "IN": + // NOTE: both NOT_IN and IN filter currently limited to non-array field + // - https://github.com/hypertrace/document-store/issues/32#issuecomment-781411676 sqlOperator = " IN "; isMultiValued = true; - isInOP = true; - filterString = - prepareFilterStringForInOperator( - parsedExpression, (Iterable) value, paramsBuilder); + value = prepareParameterizedStringForList((Iterable) value, paramsBuilder); break; case "NOT_EXISTS": case "NOT EXISTS": @@ -366,13 +336,7 @@ public static String parseNonCompositeFilter( throw new UnsupportedOperationException(UNSUPPORTED_QUERY_OPERATION); } - // final filter string has already been built for in operators - if (isInOP) { - return filterString.toString(); - } - filterString.append(sqlOperator); - if (value != null) { if (isMultiValued) { filterString.append(value); diff --git a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java index b3d774b2..c0e37765 100644 --- a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java +++ b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/PostgresQueryParserTest.java @@ -110,21 +110,7 @@ void testParseNonCompositeFilter() { filter.getOp().toString(), filter.getValue(), initParams()); - Assertions.assertEquals( - "((jsonb_build_array(to_jsonb(id)) @> jsonb_build_array(?)) OR (jsonb_build_array(to_jsonb(id)) @> jsonb_build_array(?)))", - query); - } - - { - Filter filter = new Filter(Filter.Op.IN, ID, List.of("abc")); - String query = - PostgresUtils.parseNonCompositeFilterWithCasting( - filter.getFieldName(), - PostgresUtils.DOCUMENT_COLUMN, - filter.getOp().toString(), - filter.getValue(), - initParams()); - Assertions.assertEquals("((jsonb_build_array(to_jsonb(id)) @> jsonb_build_array(?)))", query); + Assertions.assertEquals(ID + " IN (?, ?)", query); } } @@ -172,35 +158,16 @@ void testParseNonCompositeFilterForJsonField() { Assertions.assertEquals("document->>'key1' ~* ?", query); } - { - Filter filter = new Filter(Filter.Op.IN, "key1", List.of("abc")); - String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals( - "((jsonb_build_array(document->'key1') @> jsonb_build_array(?)))", query); - } - { Filter filter = new Filter(Filter.Op.IN, "key1", List.of("abc", "xyz")); String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals( - "((jsonb_build_array(document->'key1') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'key1') @> jsonb_build_array(?)))", - query); - } - - { - Filter filter = new Filter(Op.NOT_IN, "key1", List.of("abc")); - String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals( - "document->'key1' IS NULL OR NOT ((jsonb_build_array(document->'key1') @> jsonb_build_array(?)))", - query); + Assertions.assertEquals("document->>'key1' IN (?, ?)", query); } { Filter filter = new Filter(Op.NOT_IN, "key1", List.of("abc", "xyz")); String query = PostgresQueryParser.parseFilter(filter, initParams()); - Assertions.assertEquals( - "document->'key1' IS NULL OR NOT ((jsonb_build_array(document->'key1') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'key1') @> jsonb_build_array(?)))", - query); + Assertions.assertEquals("document->'key1' IS NULL OR document->>'key1' NOT IN (?, ?)", query); } { From d1d4ac710565942777251dd0d7e595cfe6c76098 Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Fri, 15 Dec 2023 17:14:05 +0530 Subject: [PATCH 7/9] address review comments --- .../documentstore/DocStoreQueryV1Test.java | 32 +++++++++++++++++++ ...umn_array_lhs_in_filter_aggr_response.json | 6 ++++ ...primitive_lhs_in_filter_aggr_response.json | 18 +++++++++++ .../PostgresFilterTypeExpressionVisitor.java | 2 ++ .../postgres/utils/PostgresUtils.java | 4 +-- 5 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 document-store/src/integrationTest/resources/query/test_json_column_array_lhs_in_filter_aggr_response.json create mode 100644 document-store/src/integrationTest/resources/query/test_primitive_lhs_in_filter_aggr_response.json diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java index a23c0a7a..2b8d33e8 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java @@ -1249,6 +1249,38 @@ public void testQueryV1AggregationFilter(String dataStoreName) throws IOExceptio dataStoreName, resultDocs, "query/distinct_count_response.json", 4); } + @ParameterizedTest + @ArgumentsSource(AllProvider.class) + public void testQueryV1AggregationWithInFilterWithPrimitiveLhs(final String dataStoreName) throws IOException { + final Collection collection = getCollection(dataStoreName); + final Query query = Query.builder() + .addSelection(IdentifierExpression.of("item")) + .addSelection(IdentifierExpression.of("quantity")) + .setFilter( + RelationalExpression.of(IdentifierExpression.of("item"), IN, ConstantExpression.ofStrings(List.of("Comb", "Shampoo"))) + ) + .build(); + + final Iterator resultDocs = collection.aggregate(query); + assertDocsAndSizeEqualWithoutOrder(dataStoreName, resultDocs, "query/test_primitive_lhs_in_filter_aggr_response.json", 4); + } + + @ParameterizedTest + @ArgumentsSource(AllProvider.class) + public void testQueryV1AggregationWithInFilterWithArrayLhs(final String dataStoreName) throws IOException { + final Collection collection = getCollection(dataStoreName); + final Query query = Query.builder() + .addSelection(IdentifierExpression.of("item")) + .addSelection(IdentifierExpression.of("price")) + .setFilter( + RelationalExpression.of(IdentifierExpression.of("props.colors"), IN, ConstantExpression.ofStrings(List.of("Orange"))) + ) + .build(); + + final Iterator resultDocs = collection.aggregate(query); + assertDocsAndSizeEqualWithoutOrder(dataStoreName, resultDocs, "query/test_json_column_array_lhs_in_filter_aggr_response.json", 1); + } + @ParameterizedTest @ArgumentsSource(AllProvider.class) public void testQueryV1AggregationFilterWithWhereClause(String dataStoreName) throws IOException { diff --git a/document-store/src/integrationTest/resources/query/test_json_column_array_lhs_in_filter_aggr_response.json b/document-store/src/integrationTest/resources/query/test_json_column_array_lhs_in_filter_aggr_response.json new file mode 100644 index 00000000..e951f265 --- /dev/null +++ b/document-store/src/integrationTest/resources/query/test_json_column_array_lhs_in_filter_aggr_response.json @@ -0,0 +1,6 @@ +[ + { + "item": "Soap", + "price": 20 + } +] \ No newline at end of file diff --git a/document-store/src/integrationTest/resources/query/test_primitive_lhs_in_filter_aggr_response.json b/document-store/src/integrationTest/resources/query/test_primitive_lhs_in_filter_aggr_response.json new file mode 100644 index 00000000..f13cab92 --- /dev/null +++ b/document-store/src/integrationTest/resources/query/test_primitive_lhs_in_filter_aggr_response.json @@ -0,0 +1,18 @@ +[ + { + "item":"Comb", + "quantity": 10 + }, + { + "item":"Comb", + "quantity": 5 + }, + { + "item":"Shampoo", + "quantity": 20 + }, + { + "item":"Shampoo", + "quantity": 10 + } +] \ No newline at end of file diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresFilterTypeExpressionVisitor.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresFilterTypeExpressionVisitor.java index 032597c7..9438fd18 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresFilterTypeExpressionVisitor.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/vistors/PostgresFilterTypeExpressionVisitor.java @@ -111,6 +111,8 @@ private boolean isOperatorNeedsFieldAccessor(RelationalOperator operator) { case NOT_CONTAINS: case EXISTS: case NOT_EXISTS: + case IN: + case NOT_IN: return true; default: return false; diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java index 1c27ce95..a67716bc 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java @@ -360,8 +360,8 @@ private static StringBuilder prepareFilterStringForInOperator( StreamSupport.stream(values.spliterator(), false) .map( val -> { - paramsBuilder.addObjectParam(val); - return "(jsonb_build_array(" + parsedExpression + ") @> jsonb_build_array(?))"; + paramsBuilder.addObjectParam(val).addObjectParam(val); + return "((jsonb_typeof(to_jsonb("+parsedExpression+")) = 'array' AND to_jsonb("+parsedExpression+") @> jsonb_build_array(?)) OR (jsonb_build_array(" + parsedExpression + ") @> jsonb_build_array(?)))"; }) .collect(Collectors.joining(" OR ")); filterStringBuilder.append(collect); From dcba0414adfb466c23fc4172d82fea37df8a5fb4 Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Fri, 15 Dec 2023 17:36:22 +0530 Subject: [PATCH 8/9] address review comments --- .../documentstore/DocStoreQueryV1Test.java | 33 ++++++++++++------ ...primitive_lhs_in_filter_aggr_response.json | 2 +- .../postgres/utils/PostgresUtils.java | 31 ++++++++++------- .../query/v1/PostgresQueryParserTest.java | 34 +++++++++---------- 4 files changed, 60 insertions(+), 40 deletions(-) diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java index 2b8d33e8..41d3ceb8 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java @@ -1251,34 +1251,47 @@ public void testQueryV1AggregationFilter(String dataStoreName) throws IOExceptio @ParameterizedTest @ArgumentsSource(AllProvider.class) - public void testQueryV1AggregationWithInFilterWithPrimitiveLhs(final String dataStoreName) throws IOException { + public void testQueryV1AggregationWithInFilterWithPrimitiveLhs(final String dataStoreName) + throws IOException { final Collection collection = getCollection(dataStoreName); - final Query query = Query.builder() + final Query query = + Query.builder() .addSelection(IdentifierExpression.of("item")) .addSelection(IdentifierExpression.of("quantity")) .setFilter( - RelationalExpression.of(IdentifierExpression.of("item"), IN, ConstantExpression.ofStrings(List.of("Comb", "Shampoo"))) - ) + RelationalExpression.of( + IdentifierExpression.of("item"), + IN, + ConstantExpression.ofStrings(List.of("Comb", "Shampoo")))) .build(); final Iterator resultDocs = collection.aggregate(query); - assertDocsAndSizeEqualWithoutOrder(dataStoreName, resultDocs, "query/test_primitive_lhs_in_filter_aggr_response.json", 4); + assertDocsAndSizeEqualWithoutOrder( + dataStoreName, resultDocs, "query/test_primitive_lhs_in_filter_aggr_response.json", 4); } @ParameterizedTest @ArgumentsSource(AllProvider.class) - public void testQueryV1AggregationWithInFilterWithArrayLhs(final String dataStoreName) throws IOException { + public void testQueryV1AggregationWithInFilterWithArrayLhs(final String dataStoreName) + throws IOException { final Collection collection = getCollection(dataStoreName); - final Query query = Query.builder() + final Query query = + Query.builder() .addSelection(IdentifierExpression.of("item")) .addSelection(IdentifierExpression.of("price")) .setFilter( - RelationalExpression.of(IdentifierExpression.of("props.colors"), IN, ConstantExpression.ofStrings(List.of("Orange"))) - ) + RelationalExpression.of( + IdentifierExpression.of("props.colors"), + IN, + ConstantExpression.ofStrings(List.of("Orange")))) .build(); final Iterator resultDocs = collection.aggregate(query); - assertDocsAndSizeEqualWithoutOrder(dataStoreName, resultDocs, "query/test_json_column_array_lhs_in_filter_aggr_response.json", 1); + assertDocsAndSizeEqualWithoutOrder( + dataStoreName, + resultDocs, + "query/test_json_column_array_lhs_in_filter_aggr_response.json", + 1); } @ParameterizedTest diff --git a/document-store/src/integrationTest/resources/query/test_primitive_lhs_in_filter_aggr_response.json b/document-store/src/integrationTest/resources/query/test_primitive_lhs_in_filter_aggr_response.json index f13cab92..94c8e677 100644 --- a/document-store/src/integrationTest/resources/query/test_primitive_lhs_in_filter_aggr_response.json +++ b/document-store/src/integrationTest/resources/query/test_primitive_lhs_in_filter_aggr_response.json @@ -15,4 +15,4 @@ "item":"Shampoo", "quantity": 10 } -] \ No newline at end of file +] diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java index a67716bc..eec977ab 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java @@ -361,7 +361,13 @@ private static StringBuilder prepareFilterStringForInOperator( .map( val -> { paramsBuilder.addObjectParam(val).addObjectParam(val); - return "((jsonb_typeof(to_jsonb("+parsedExpression+")) = 'array' AND to_jsonb("+parsedExpression+") @> jsonb_build_array(?)) OR (jsonb_build_array(" + parsedExpression + ") @> jsonb_build_array(?)))"; + return "((jsonb_typeof(to_jsonb(" + + parsedExpression + + ")) = 'array' AND to_jsonb(" + + parsedExpression + + ") @> jsonb_build_array(?)) OR (jsonb_build_array(" + + parsedExpression + + ") @> jsonb_build_array(?)))"; }) .collect(Collectors.joining(" OR ")); filterStringBuilder.append(collect); @@ -418,7 +424,6 @@ public static String prepareParsedNonCompositeFilter( String sqlOperator; boolean isMultiValued = false; boolean isContainsOp = false; - boolean isInOP = false; switch (op) { case "EQ": case "=": @@ -450,25 +455,31 @@ public static String prepareParsedNonCompositeFilter( case "NOT_IN": case "NOT IN": // NOTE: Pl. refer this in non-parsed expression for limitation of this filter + // In order to make the behaviour same as for mongo, the not in operator would match only if + // the lhs + // and rhs have no intersection at all + // NOTE: This doesn't work in case the lhs is a function sqlOperator = " NOT IN "; isMultiValued = true; - isInOP = true; filterString .append(" IS NULL OR") - .append(" NOT ") + .append(" NOT (") .append( prepareFilterStringForInOperator( - preparedExpression, (Iterable) value, paramsBuilder)); - break; + preparedExpression, (Iterable) value, paramsBuilder)) + .append(")"); + return filterString.toString(); case "IN": + // In order to make the behaviour same as for mongo, the in operator would match if the lhs + // and rhs have any intersection at all // NOTE: Pl. refer this in non-parsed expression for limitation of this filter + // NOTE: This doesn't work in case the lhs is a function sqlOperator = " IN "; isMultiValued = true; - isInOP = true; filterString = prepareFilterStringForInOperator( preparedExpression, (Iterable) value, paramsBuilder); - break; + return filterString.toString(); case "NOT_EXISTS": case "NOT EXISTS": sqlOperator = " IS NULL "; @@ -505,10 +516,6 @@ public static String prepareParsedNonCompositeFilter( throw new UnsupportedOperationException(UNSUPPORTED_QUERY_OPERATION); } - if (isInOP) { - return filterString.toString(); - } - filterString.append(sqlOperator); if (value != null) { if (isMultiValued) { diff --git a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/PostgresQueryParserTest.java b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/PostgresQueryParserTest.java index e880dd3b..3451f211 100644 --- a/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/PostgresQueryParserTest.java +++ b/document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/PostgresQueryParserTest.java @@ -648,19 +648,19 @@ void testFindWithSortingAndPagination() { + "document->'quantity' AS \"quantity\", " + "document->'date' AS \"date\" " + "FROM \"testCollection\" " - + "WHERE ((jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?))) " + + "WHERE (((jsonb_typeof(to_jsonb(document->'item')) = 'array' AND to_jsonb(document->'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'item') @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(document->'item')) = 'array' AND to_jsonb(document->'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'item') @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(document->'item')) = 'array' AND to_jsonb(document->'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'item') @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(document->'item')) = 'array' AND to_jsonb(document->'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'item') @> jsonb_build_array(?)))) " + "ORDER BY document->'quantity' DESC NULLS LAST,document->'item' ASC NULLS FIRST " + "OFFSET ? LIMIT ?", sql); Params params = postgresQueryParser.getParamsBuilder().build(); - assertEquals(6, params.getObjectParams().size()); + assertEquals(10, params.getObjectParams().size()); assertEquals("Mirror", params.getObjectParams().get(1)); - assertEquals("Comb", params.getObjectParams().get(2)); - assertEquals("Shampoo", params.getObjectParams().get(3)); - assertEquals("Bottle", params.getObjectParams().get(4)); - assertEquals(1, params.getObjectParams().get(5)); - assertEquals(3, params.getObjectParams().get(6)); + assertEquals("Comb", params.getObjectParams().get(3)); + assertEquals("Shampoo", params.getObjectParams().get(5)); + assertEquals("Bottle", params.getObjectParams().get(7)); + assertEquals(1, params.getObjectParams().get(9)); + assertEquals(3, params.getObjectParams().get(10)); } @Test @@ -1121,16 +1121,16 @@ void testQueryQ1AggregationFilterWithStringInFilterAlongWithNonAliasFields() { "SELECT COUNT(DISTINCT document->>'quantity' ) AS \"qty_count\", " + "document->'item' AS \"item\", document->'price' AS \"price\" " + "FROM \"testCollection\" GROUP BY document->'item',document->'price' " - + "HAVING (COUNT(DISTINCT document->>'quantity' ) <= ?) AND (((jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?))))", + + "HAVING (COUNT(DISTINCT document->>'quantity' ) <= ?) AND ((((jsonb_typeof(to_jsonb(CAST (document->'item' AS TEXT))) = 'array' AND to_jsonb(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(CAST (document->'item' AS TEXT))) = 'array' AND to_jsonb(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(CAST (document->'item' AS TEXT))) = 'array' AND to_jsonb(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(CAST (document->'item' AS TEXT))) = 'array' AND to_jsonb(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)) OR (jsonb_build_array(CAST (document->'item' AS TEXT)) @> jsonb_build_array(?)))))", sql); Params params = postgresQueryParser.getParamsBuilder().build(); - assertEquals(5, params.getObjectParams().size()); + assertEquals(9, params.getObjectParams().size()); assertEquals(10, params.getObjectParams().get(1)); assertEquals("\"Mirror\"", params.getObjectParams().get(2)); - assertEquals("\"Comb\"", params.getObjectParams().get(3)); - assertEquals("\"Shampoo\"", params.getObjectParams().get(4)); - assertEquals("\"Bottle\"", params.getObjectParams().get(5)); + assertEquals("\"Comb\"", params.getObjectParams().get(4)); + assertEquals("\"Shampoo\"", params.getObjectParams().get(6)); + assertEquals("\"Bottle\"", params.getObjectParams().get(8)); } @Test @@ -1164,16 +1164,16 @@ void testQueryQ1DistinctCountAggregationWithOnlyFilter() { assertEquals( "SELECT COUNT(DISTINCT document->>'quantity' ) AS \"qty_count\" " + "FROM \"testCollection\" " - + "WHERE (CAST (document->>'price' AS NUMERIC) <= ?) AND (((jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->>'item') @> jsonb_build_array(?))))", + + "WHERE (CAST (document->>'price' AS NUMERIC) <= ?) AND ((((jsonb_typeof(to_jsonb(document->'item')) = 'array' AND to_jsonb(document->'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'item') @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(document->'item')) = 'array' AND to_jsonb(document->'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'item') @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(document->'item')) = 'array' AND to_jsonb(document->'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'item') @> jsonb_build_array(?))) OR ((jsonb_typeof(to_jsonb(document->'item')) = 'array' AND to_jsonb(document->'item') @> jsonb_build_array(?)) OR (jsonb_build_array(document->'item') @> jsonb_build_array(?)))))", sql); Params params = postgresQueryParser.getParamsBuilder().build(); - assertEquals(5, params.getObjectParams().size()); + assertEquals(9, params.getObjectParams().size()); assertEquals(10, params.getObjectParams().get(1)); assertEquals("Mirror", params.getObjectParams().get(2)); - assertEquals("Comb", params.getObjectParams().get(3)); - assertEquals("Shampoo", params.getObjectParams().get(4)); - assertEquals("Bottle", params.getObjectParams().get(5)); + assertEquals("Comb", params.getObjectParams().get(4)); + assertEquals("Shampoo", params.getObjectParams().get(6)); + assertEquals("Bottle", params.getObjectParams().get(8)); } @Test From e6892910f65ce7522d6bbccfba9742f163eb27df Mon Sep 17 00:00:00 2001 From: Srikar Mannepalli Date: Fri, 15 Dec 2023 18:05:33 +0530 Subject: [PATCH 9/9] address review comments --- .../postgres/utils/PostgresUtils.java | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java index eec977ab..dad594de 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/postgres/utils/PostgresUtils.java @@ -361,13 +361,9 @@ private static StringBuilder prepareFilterStringForInOperator( .map( val -> { paramsBuilder.addObjectParam(val).addObjectParam(val); - return "((jsonb_typeof(to_jsonb(" - + parsedExpression - + ")) = 'array' AND to_jsonb(" - + parsedExpression - + ") @> jsonb_build_array(?)) OR (jsonb_build_array(" - + parsedExpression - + ") @> jsonb_build_array(?)))"; + return String.format( + "((jsonb_typeof(to_jsonb(%s)) = 'array' AND to_jsonb(%s) @> jsonb_build_array(?)) OR (jsonb_build_array(%s) @> jsonb_build_array(?)))", + parsedExpression, parsedExpression, parsedExpression); }) .collect(Collectors.joining(" OR ")); filterStringBuilder.append(collect); @@ -454,11 +450,10 @@ public static String prepareParsedNonCompositeFilter( break; case "NOT_IN": case "NOT IN": - // NOTE: Pl. refer this in non-parsed expression for limitation of this filter - // In order to make the behaviour same as for mongo, the not in operator would match only if - // the lhs - // and rhs have no intersection at all - // NOTE: This doesn't work in case the lhs is a function + // In order to make the behaviour same as for Mongo, the "NOT_IN" operator would match only + // if + // the LHS and RHS have no intersection at all + // NOTE: This doesn't work in case the LHS is a function sqlOperator = " NOT IN "; isMultiValued = true; filterString @@ -470,10 +465,10 @@ public static String prepareParsedNonCompositeFilter( .append(")"); return filterString.toString(); case "IN": - // In order to make the behaviour same as for mongo, the in operator would match if the lhs - // and rhs have any intersection at all + // In order to make the behaviour same as for Mongo, the "INI" operator would match if the + // LHS and RHS have any intersection (i.e. non-empty intersection) // NOTE: Pl. refer this in non-parsed expression for limitation of this filter - // NOTE: This doesn't work in case the lhs is a function + // NOTE: This doesn't work in case the LHS is a function sqlOperator = " IN "; isMultiValued = true; filterString =