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

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-bansal committed Jun 17, 2024
1 parent 0ef4cb6 commit 0018a07
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// Hold some of request fields and mappings needed when parsing the query service response
public class QueryRequestContext extends RequestContext {
private final Map<String, FunctionExpression> aliasToFunctionExpressionMap = new HashMap<>();
private final Map<FunctionExpression, String> functionExpressionToAliasMap = new HashMap<>();
private final long startTimeMillis;
private final long endTimeMillis;
private final Map<String, TimeAggregation> aliasToTimeAggregation = new HashMap<>();
Expand All @@ -25,11 +24,6 @@ public QueryRequestContext(

public void mapAliasToFunctionExpression(String alias, FunctionExpression functionExpression) {
aliasToFunctionExpressionMap.put(alias, functionExpression);
functionExpressionToAliasMap.put(functionExpression, alias);
}

public String getAliasForFunctionExpression(FunctionExpression functionExpression) {
return functionExpressionToAliasMap.get(functionExpression);
}

public boolean containsFunctionExpression(String alias) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,14 @@
import java.util.stream.Collectors;
import org.hypertrace.gateway.service.v1.common.Expression;
import org.hypertrace.gateway.service.v1.common.FunctionExpression;
import org.hypertrace.gateway.service.v1.common.OrderByExpression;

public class ExpressionReader {
public static List<OrderByExpression> getFunctionOrderByExpressions(
List<OrderByExpression> expressions) {
return expressions.stream()
.filter(
expression ->
expression.getExpression().getValueCase() == Expression.ValueCase.FUNCTION)
.collect(Collectors.toUnmodifiableList());
}

public static List<Expression> getFunctionExpressions(List<Expression> expressions) {
return expressions.stream()
.filter(expression -> expression.getValueCase() == Expression.ValueCase.FUNCTION)
.collect(Collectors.toUnmodifiableList());
}

public static List<OrderByExpression> getAttributeOrderByExpressions(
List<OrderByExpression> expressions) {
return expressions.stream()
.filter(expression -> isAttributeSelection(expression.getExpression()))
.collect(Collectors.toUnmodifiableList());
}

public static List<Expression> getAttributeExpressions(List<Expression> expressions) {
return expressions.stream()
.filter(ExpressionReader::isAttributeSelection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@
import org.hypertrace.gateway.service.explore.entity.EntityServiceEntityFetcher;
import org.hypertrace.gateway.service.v1.explore.ExploreRequest;
import org.hypertrace.gateway.service.v1.explore.ExploreResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ExploreService {

private static final Logger log = LoggerFactory.getLogger(ExploreService.class);
private final GatewayServiceConfig gatewayServiceConfig;
private final AttributeMetadataProvider attributeMetadataProvider;
private final ExploreRequestValidator exploreRequestValidator = new ExploreRequestValidator();
Expand Down

0 comments on commit 0018a07

Please sign in to comment.