Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.34.0
-
None
Description
Example:
final Sarg<BigDecimal> badComplimentPointsSarg = Sarg.of( RexUnknownAs.UNKNOWN, TreeRangeSet.create( Arrays.asList( // Create anti-point around 1, with different scales Range.lessThan(new BigDecimal("1")), Range.greaterThan(new BigDecimal("1.00000000000")) ) ) ); assertThat(badComplimentPointsSarg.isComplementedPoints(), is(true));
will fail.
This is because RangeSets.isPoints uses direct equality and not `Comparable.compareTo` equality
The values `1` and `1.00000000000` are not equal under `BigDecimal.equals` but are equal under `BigDecimal.compareTo`.
Attachments
Issue Links
- links to