Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2802

Druid adapter: Usage of range conditions like "2010-01-01 < timestamp" leads to incorrect results

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.19.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        @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]"));
        }
      

      Fail:

      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]"
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kgyrtkirk Zoltan Haindrich
                Reporter:
                kgyrtkirk Zoltan Haindrich
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: