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

SET operation between DATE and TIMESTAMP returns a wrong result

    XMLWordPrintableJSON

    Details

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

      Description

      @Test public void testUnionTime() {
       CalciteAssert.AssertThat assertThat = CalciteAssert.that();
       String query = "select * from (\n"
       + "select \"id\" from (VALUES(DATE '2018-02-03')) \"foo\"(\"id\")\n"
       + "union\n"
       + "select \"id\" from (VALUES(TIMESTAMP '2008-03-31 12:23:34')) \"foo\"(\"id\"))";
       assertThat.query(query).returns("id=2108-03-12\nid=2018-02-03\n");
      }

      The test with wrong result passed.

       

        Attachments

          Activity

            People

            • Assignee:
              danny0405 Danny Chen
              Reporter:
              winipanda TANG Wen-hui
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m