From 286a35db101efe02ca1bec962b94cf0d8a3a33cf Mon Sep 17 00:00:00 2001 From: Krzysztof Kiewicz Date: Fri, 27 Dec 2024 13:38:58 +0100 Subject: [PATCH] Cleanup --- quesma/model/bucket_aggregations/ip_range.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/quesma/model/bucket_aggregations/ip_range.go b/quesma/model/bucket_aggregations/ip_range.go index b3663b47e..3d07bb84b 100644 --- a/quesma/model/bucket_aggregations/ip_range.go +++ b/quesma/model/bucket_aggregations/ip_range.go @@ -98,8 +98,8 @@ func (interval IpInterval) ToWhereClause(field model.Expr) model.Expr { isBegin := interval.begin != UnboundedInterval isEnd := interval.end != UnboundedInterval && interval.end != BiggestIpv4 - begin := model.TrueExpr //model.NewInfixExpr(field, ">=", model.NewLiteralSingleQuoted(interval.begin)) - end := model.TrueExpr //model.NewInfixExpr(field, "<", model.NewLiteralSingleQuoted(interval.end)) + begin := model.NewInfixExpr(field, ">=", model.NewLiteralSingleQuoted(interval.begin)) + end := model.NewInfixExpr(field, "<", model.NewLiteralSingleQuoted(interval.end)) if isBegin && isEnd { return model.NewInfixExpr(begin, "AND", end) @@ -125,7 +125,6 @@ func (query *IpRange) AggregationType() model.AggregationType { } func (query *IpRange) TranslateSqlResponseToJson(rows []model.QueryResultRow) model.JsonMap { - fmt.Println("DUPA", rows) return nil } @@ -156,7 +155,6 @@ func (query *IpRange) CombinatorGroups() (result []CombinatorGroup) { // bad requests: both to/from and mask func (query *IpRange) CombinatorTranslateSqlResponseToJson(subGroup CombinatorGroup, rows []model.QueryResultRow) model.JsonMap { - fmt.Println("SB", subGroup, "ROWS", rows) if len(rows) == 0 || len(rows[0].Cols) == 0 { logger.ErrorWithCtx(query.ctx).Msgf("need at least one row and column in ip_range aggregation response, rows: %d, cols: %d", len(rows), len(rows[0].Cols)) return model.JsonMap{}