[
https://issues.apache.org/jira/browse/CALCITE-2802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoltan Haindrich resolved CALCITE-2802.
---------------------------------------
Resolution: Fixed
Fix Version/s: 1.19.0
fixed in
[1961d13|https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=1961d13fd801a6ef8d12ae6babdb75e61f87013f].
Thank you [~jcamachorodriguez] for reviewing the changes!
> Druid adapter: Usage of range conditions like "2010-01-01 < timestamp" leads
> to incorrect results
> -------------------------------------------------------------------------------------------------
>
> Key: CALCITE-2802
> URL: https://issues.apache.org/jira/browse/CALCITE-2802
> Project: Calcite
> Issue Type: Bug
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Priority: Major
> Fix For: 1.19.0
>
>
> Timestamp range conditions when the timestamp is on left hand side work
> correctly; however when the literal is on the left hand side results are
> missing.
> {code}
> @Test
> public void testRangeCalc() {
> final Fixture2 f = new Fixture2();
> checkDateRange(f,
> f.and(
> f.le(f.timestampLiteral(2011, Calendar.JANUARY, 1), f.t),
> f.le(f.t, f.timestampLiteral(2012, Calendar.FEBRUARY, 2))),
> is("[2011-01-01T00:00:00.000Z/2012-02-02T00:00:00.001Z]"));
> }
> {code}
> Fail:
> {code}
> java.lang.AssertionError:
> Expected: is "[2011-01-01T00:00:00.000Z/2012-02-02T00:00:00.001Z]"
> but: was "[1900-01-01T00:00:00.000Z/2011-01-01T00:00:00.001Z]"
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)