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

Simplifying CAST(characterLiteral as TIMESTAMP) should round the sub-second fraction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.12.0
    • None
    • None

    Description

      Timestamps are losing sub-second parts after Calcite literal constant reduction.

      select cast("1970-12-31 15:59:58.174" as TIMESTAMP) from src limit 1;
      

      yields 1970-12-31 15:59:58 if CBO is enabled in Hive. ZonelessTimestamp.toString() contains a truncation 0-19 (ie. removes sub-second part from string representation).

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              rusanu Remus Rusanu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: