Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-417

TestSQLExpression.testCastFromTable causes unit test failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 0.8.0
    • Expression
    • None

    Description

      testSimpleEval("select '1980-04-01 01:50:01'::timestamp::bigint;", new String [] {"323369401000"});
          testSimpleEval("select ('1980-04-01 01:50:01'::timestamp)::bigint;", new String [] {"323369401000"});
      

      The above unit tests can cause failure due to the precision difference between bigint value and the value casted from timestamp string. This patch eliminates the difference by using only timestamp strings.

      testSimpleEval("select '1980-04-01 01:50:01'::timestamp::bigint::timestamp", new String [] {"1980-04-01 01:50:01"});
          testSimpleEval("select cast (('1980-04-01 01:50:01'::timestamp)::bigint as timestamp)",
              new String [] {"1980-04-01 01:50:01"});
      

      Attachments

        1. TAJO-417.patch
          1 kB
          Hyunsik Choi

        Activity

          People

            hyunsik Hyunsik Choi
            hyunsik Hyunsik Choi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: