public Marker canonicalize(boolean removeConstants)
    {
        if (valueBlock.isPresent() && removeConstants) {
            // For REMOVE_CONSTANTS, we replace this with null
            return new Marker(type, Optional.of(Utils.nativeValueToBlock(type, null)), bound);
        }
        return this;
    }
@Test
    public void testCanonicalize()
            throws Exception
    {
        assertSameMarker(Marker.above(BIGINT, 0L), Marker.above(BIGINT, 0L), false);
        assertSameMarker(Marker.above(VARCHAR, utf8Slice("abc")), Marker.above(VARCHAR, utf8Slice("abc")), false);
        assertSameMarker(Marker.upperUnbounded(BIGINT), Marker.upperUnbounded(BIGINT), false);

        assertDifferentMarker(Marker.above(BIGINT, 0L), Marker.above(BIGINT, 5L), false);
        assertDifferentMarker(Marker.above(VARCHAR, utf8Slice("abc")), Marker.above(VARCHAR, utf8Slice("abcd")), false);
        assertDifferentMarker(Marker.upperUnbounded(BIGINT), Marker.upperUnbounded(VARCHAR), false);

        assertDifferentMarker(Marker.above(BIGINT, 0L), Marker.below(BIGINT, 0L), false);
        assertDifferentMarker(Marker.below(BIGINT, 0L), Marker.exactly(BIGINT, 0L), false);
        assertDifferentMarker(Marker.upperUnbounded(BIGINT), Marker.lowerUnbounded(BIGINT), false);

        assertSameMarker(Marker.above(BIGINT, 0L), Marker.above(BIGINT, 5L), true);
        assertSameMarker(Marker.below(BIGINT, 0L), Marker.below(BIGINT, 5L), true);
        assertSameMarker(Marker.exactly(BIGINT, 0L), Marker.exactly(BIGINT, 5L), true);
        assertSameMarker(Marker.above(VARCHAR, utf8Slice("abc")), Marker.above(VARCHAR, utf8Slice("abcd")), true);

        assertDifferentMarker(Marker.above(BIGINT, 0L), Marker.below(BIGINT, 0L), true);
        assertDifferentMarker(Marker.below(BIGINT, 0L), Marker.exactly(BIGINT, 0L), true);
        assertDifferentMarker(Marker.upperUnbounded(BIGINT), Marker.lowerUnbounded(BIGINT), true);
    }