Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

fix(explore): skip child filters for default filter #176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,18 @@ private void addSelections(

private Filter.Builder buildFilter(
ExploreRequest exploreRequest, List<String> entityIdAttributeIds, Set<String> entityIds) {
if (org.hypertrace.gateway.service.v1.common.Filter.getDefaultInstance()
.equals(exploreRequest.getFilter())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rely on presence check? or is there an upstream bug? Either way, not sure I'm following why entity IDs are ignored if there's no filter? Shouldn't we just not be and'ing and using only the in filter?

return Filter.newBuilder();
}

Builder filterBuilder =
Filter.newBuilder()
.setOperator(Operator.AND)
.addChildFilter(
EntityServiceAndGatewayServiceConverter.convertToEntityServiceFilter(
exploreRequest.getFilter()));

if (entityIds.isEmpty()) {
return filterBuilder;
}
Expand Down