kgyrtkirk opened a new issue, #18205:
URL: https://github.com/apache/druid/issues/18205
For a value like `0.1` the best float / double representation is different.
right now:
* `RangeFilter` doesn't match in these cases
* `EqualityFilter` does match
`Filtration` rewrites single-value `RangeFilter` to `EqualityFilter` which
makes this issue in most cases absent.
`RangeFilter` works like:
```
assertFilterMatches(
new RangeFilter("d0", ColumnType.FLOAT, 60.0f, 60.0f, false,
false, null),
ImmutableList.of("4")
);
assertFilterMatches(
new RangeFilter("d0", ColumnType.DOUBLE, 60.0f, 60.0f, false,
false, null),
ImmutableList.of("4")
);
assertFilterMatches(
new RangeFilter("f0", ColumnType.FLOAT, 10.1f, 10.1f, false,
false, null),
ImmutableList.of("1")
);
assertFilterMatches(
new RangeFilter("f0", ColumnType.DOUBLE, 10.1, 10.1, false, false,
null),
ImmutableList.of()
);
```
meanwhile for `EqualityFilter` matches:
```
assertFilterMatches(new EqualityFilter("f0", ColumnType.FLOAT, 10.1,
null), ImmutableList.of("1"));
assertFilterMatches(new EqualityFilter("f0", ColumnType.DOUBLE, 10.1,
null), ImmutableList.of("1"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]