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

Avatica ignores time precision when returning TIME results

    XMLWordPrintableJSON

Details

    Description

      SqlOperatorTest contains the following disabled test:

      f.checkScalar("cast(TIME '12:42:25.34' as TIME(2))",
              "12:42:25.34", "TIME(2) NOT NULL");
      

      This test is disabled based on the following condition;

        /**
         * Whether <a href="http://issues.eigenbase.org/browse/FRG-282">issue
         * FRG-282: Support precision in TIME and TIMESTAMP data types</a> is fixed.
         */
        public static final boolean FRG282_FIXED = true;
      

      However, the result is computed correctly. The precision is lost in the JDBC layer, which creates a TimeFromNumberAccessor which does not depend on the precision of the target type: it always returns the time with a precision of 0.

      Attachments

        Activity

          People

            mbudiu Mihai Budiu
            mbudiu Mihai Budiu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: