Skip to content

Commit

Permalink
Ignore 'format' property when processing date range's bounds (#25)
Browse files Browse the repository at this point in the history
When parsing constraints of `date_range`, it's possible to encounter
`format`, which should be explicitly ignored, because:
- it's not a constraint
- it's processed in a different place

> quesma-1 | May 2 15:10:42.854 WRN
quesma/queryparser/query_parser.go:883 > invalid range operator: format
path=/logs-*,filebeat-*,kibana_sample_data_logs*/_search request_id=56
  • Loading branch information
pivovarit authored May 2, 2024
1 parent 09bbc61 commit b63e2ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions quesma/queryparser/query_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,8 @@ func (cw *ClickhouseQueryTranslator) parseRange(queryMap QueryMap) SimpleQuery {
stmts = append(stmts, NewSimpleStatement(fieldToPrint+">"+vToPrint))
case "lt":
stmts = append(stmts, NewSimpleStatement(fieldToPrint+"<"+vToPrint))
case "format":
// ignored
default:
logger.WarnWithCtx(cw.Ctx).Msgf("invalid range operator: %s", op)
}
Expand Down

0 comments on commit b63e2ab

Please sign in to comment.