This is an automated email from the ASF dual-hosted git repository. yashmayya pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push: new 99df0ad0e6 Add JsonProperty to correctly serialize and deserialize 'rlsFiltersApplied' in broker response (#16250) 99df0ad0e6 is described below commit 99df0ad0e6951dc5cd43f4d9ec793aadfda81c19 Author: 9aman <35227405+9a...@users.noreply.github.com> AuthorDate: Wed Jul 2 12:10:30 2025 +0530 Add JsonProperty to correctly serialize and deserialize 'rlsFiltersApplied' in broker response (#16250) --- .../pinot/common/response/broker/BrokerResponseNative.java | 2 ++ .../pinot/common/response/broker/BrokerResponseNativeV2.java | 2 ++ .../integration/tests/RowLevelSecurityIntegrationTest.java | 11 ++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pinot-common/src/main/java/org/apache/pinot/common/response/broker/BrokerResponseNative.java b/pinot-common/src/main/java/org/apache/pinot/common/response/broker/BrokerResponseNative.java index 9af536f5ab..60a035ead6 100644 --- a/pinot-common/src/main/java/org/apache/pinot/common/response/broker/BrokerResponseNative.java +++ b/pinot-common/src/main/java/org/apache/pinot/common/response/broker/BrokerResponseNative.java @@ -581,11 +581,13 @@ public class BrokerResponseNative implements BrokerResponse { return _pools; } + @JsonProperty("rlsFiltersApplied") @Override public void setRLSFiltersApplied(boolean rlsFiltersApplied) { _rlsFiltersApplied = rlsFiltersApplied; } + @JsonProperty("rlsFiltersApplied") @Override public boolean getRLSFiltersApplied() { return _rlsFiltersApplied; diff --git a/pinot-common/src/main/java/org/apache/pinot/common/response/broker/BrokerResponseNativeV2.java b/pinot-common/src/main/java/org/apache/pinot/common/response/broker/BrokerResponseNativeV2.java index 557ed032a9..0926a811c0 100644 --- a/pinot-common/src/main/java/org/apache/pinot/common/response/broker/BrokerResponseNativeV2.java +++ b/pinot-common/src/main/java/org/apache/pinot/common/response/broker/BrokerResponseNativeV2.java @@ -406,11 +406,13 @@ public class BrokerResponseNativeV2 implements BrokerResponse { return _pools; } + @JsonProperty("rlsFiltersApplied") @Override public void setRLSFiltersApplied(boolean rlsFiltersApplied) { _rlsFiltersApplied = rlsFiltersApplied; } + @JsonProperty("rlsFiltersApplied") @Override public boolean getRLSFiltersApplied() { return _rlsFiltersApplied; diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/RowLevelSecurityIntegrationTest.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/RowLevelSecurityIntegrationTest.java index 8c9566f4c9..5668812834 100644 --- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/RowLevelSecurityIntegrationTest.java +++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/RowLevelSecurityIntegrationTest.java @@ -301,9 +301,14 @@ public class RowLevelSecurityIntegrationTest extends BaseClusterIntegrationTest return response; } - private boolean compareRows(JsonNode expectedResponse, JsonNode response) { - JsonNode responseRow = response.get("resultTable").get("rows").get(0); - JsonNode expectedRow = expectedResponse.get("resultTable").get("rows").get(0); + private boolean compareRows(JsonNode adminQueryResponse, JsonNode userQueryResponse) { + // No filters should get applied for admin response + Assert.assertFalse(adminQueryResponse.get("rlsFiltersApplied").asBoolean()); + // Filters are always applied in case of users + Assert.assertTrue(userQueryResponse.get("rlsFiltersApplied").asBoolean()); + + JsonNode responseRow = userQueryResponse.get("resultTable").get("rows").get(0); + JsonNode expectedRow = adminQueryResponse.get("resultTable").get("rows").get(0); // Compare each column for (int i = 0; i < responseRow.size(); i++) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org