Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1003

wrong converting to_timestamp(text, text)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.10.0
    • Component/s: Function/UDF
    • Labels:
      None
    • Environment:

      0.9.0-SNAPSHOT

      Description

      >> SELECT to_timestamp('2011-11-11', 'YYYY-MM-DD'); results in '2011-11-10 23:00:00' I would have expected the following result '2011-11-11 00:00:00'

      ALSO:

      >> SELECT to_timestamp(2011-11-11', 'DD-MM-YYYY'); results in '0017-05-02 23:00:00'

        Issue Links

          Activity

          Hide
          hyunsik Hyunsik Choi added a comment -

          It was already fixed in TAJO-1234.

          Show
          hyunsik Hyunsik Choi added a comment - It was already fixed in TAJO-1234 .
          Hide
          hyunsik Hyunsik Choi added a comment - - edited

          Since JVM does not recognize CEST, I failed to reproduce the problem before then. Now, I can reproduce the problem by setting export TZ = 'CET'. I'll fix it soon.

          Thanks,
          Hyunsik

          Show
          hyunsik Hyunsik Choi added a comment - - edited Since JVM does not recognize CEST, I failed to reproduce the problem before then. Now, I can reproduce the problem by setting export TZ = 'CET'. I'll fix it soon. Thanks, Hyunsik
          Hide
          hyunsik Hyunsik Choi added a comment -

          Thank you Christian Schwabe for your quick response.

          If so, the bug seems to be caused by some timezone related problem. I'll try to find the solution with timezone.

          Thanks,
          Hyunsik

          Show
          hyunsik Hyunsik Choi added a comment - Thank you Christian Schwabe for your quick response. If so, the bug seems to be caused by some timezone related problem. I'll try to find the solution with timezone. Thanks, Hyunsik
          Hide
          Christian Schwabe Christian Schwabe added a comment - - edited

          Hi Hyunsik Choi

          I add the following line to ${TAJO_ROOT}/conf/tajo-env.sh

          export TZ="UTC"

          >> SELECT timestamp '2001-09-28 01:00' INTERVAL + '1 days' results in '2001-09-29 01:00:00'
          In my opinion the result appears to be correct.

          Kind regards,
          Chris

          Show
          Christian Schwabe Christian Schwabe added a comment - - edited Hi Hyunsik Choi I add the following line to ${TAJO_ROOT}/conf/tajo-env.sh export TZ= "UTC" >> SELECT timestamp '2001-09-28 01:00' INTERVAL + '1 days' results in '2001-09-29 01:00:00' In my opinion the result appears to be correct. Kind regards, Chris
          Hide
          hyunsik Hyunsik Choi added a comment - - edited

          Hi Christian Schwabe,

          Unfortunately, I couldn't reproduce this problem in my environment. I'm expecting that it is a timezone-related problem. So, could you try one thing and than share the result? It would greatly appreciate you if you help me find the problem.

          The trial is to add the following line to ${TAJO_ROOT}/conf/tajo-env.sh and than restart your tajo cluster. The following trial will let your Tajo cluster to work without local timezone. With this trial, I can figure out whether this bug is caused by local timezone or not.

          export TZ="UTC"
          

          Thanks,
          Hyunsik

          Show
          hyunsik Hyunsik Choi added a comment - - edited Hi Christian Schwabe , Unfortunately, I couldn't reproduce this problem in my environment. I'm expecting that it is a timezone-related problem. So, could you try one thing and than share the result? It would greatly appreciate you if you help me find the problem. The trial is to add the following line to ${TAJO_ROOT}/conf/tajo-env.sh and than restart your tajo cluster. The following trial will let your Tajo cluster to work without local timezone. With this trial, I can figure out whether this bug is caused by local timezone or not. export TZ= "UTC" Thanks, Hyunsik
          Hide
          hyunsik Hyunsik Choi added a comment -

          From your report in TAJO-761, I found that your version is 0.9.0-SNAPSHOT. Also, I got your time zone (UTC+2) from your comment. I'm digging into this problem.

          Show
          hyunsik Hyunsik Choi added a comment - From your report in TAJO-761 , I found that your version is 0.9.0-SNAPSHOT. Also, I got your time zone (UTC+2) from your comment. I'm digging into this problem.
          Hide
          hyunsik Hyunsik Choi added a comment -

          Christian also reported the following bug in TAJO-761.

          In my case by tipping >> SELECT timestamp '2001-09-28 01:00' + INTERVAL '23 hours'; I get the following result: '2001-09-28 23:00:00'. There is missing one hour. Can anyone agree with that? I use the version 0.9.0-SNAPSHOT.

          >> SELECT timestamp '2001-09-28 01:00' INTERVAL + '1 days' results in '2001-09-29 00:00:00' // There is one hour missing. I think all functions should be checked again on your correctness.

          Show
          hyunsik Hyunsik Choi added a comment - Christian also reported the following bug in TAJO-761 . In my case by tipping >> SELECT timestamp '2001-09-28 01:00' + INTERVAL '23 hours'; I get the following result: '2001-09-28 23:00:00'. There is missing one hour. Can anyone agree with that? I use the version 0.9.0-SNAPSHOT. >> SELECT timestamp '2001-09-28 01:00' INTERVAL + '1 days' results in '2001-09-29 00:00:00' // There is one hour missing. I think all functions should be checked again on your correctness.
          Hide
          Christian Schwabe Christian Schwabe added a comment -

          For my used version see above, under environment.

          echo $TZ
          _
          echo date
          Di 12 Aug 2014 07:31:05 CEST

          Show
          Christian Schwabe Christian Schwabe added a comment - For my used version see above, under environment. echo $TZ _ echo date Di 12 Aug 2014 07:31:05 CEST
          Hide
          hyunsik Hyunsik Choi added a comment -

          Christian also mentioned the following bug in TAJO-212.

          SELECT CAST('2011-01-01' AS TIMESTAMP); should resolved in '2011-01-01 00:00:00' but i got '2010-12-31 23:00:00'.

          Show
          hyunsik Hyunsik Choi added a comment - Christian also mentioned the following bug in TAJO-212 . SELECT CAST('2011-01-01' AS TIMESTAMP); should resolved in '2011-01-01 00:00:00' but i got '2010-12-31 23:00:00'.
          Hide
          hyunsik Hyunsik Choi added a comment - - edited

          Hi Christian Schwabe,

          I'm trying to reproduce your problem. For more exact reproduction, I need some information.

          • Could you check and share your timezone as follows?
            hyunsik@dbserver ~ $ echo $TZ
            _
            hyunsik@dbserver ~ $ date
            Tue Aug 12 14:18:19 KST 2014
            hyunsik@dbserver ~ $ 
            
          • Is your version either 0.9.0-SNAPSHOT or 0.8.0 release?
          Show
          hyunsik Hyunsik Choi added a comment - - edited Hi Christian Schwabe , I'm trying to reproduce your problem. For more exact reproduction, I need some information. Could you check and share your timezone as follows? hyunsik@dbserver ~ $ echo $TZ _ hyunsik@dbserver ~ $ date Tue Aug 12 14:18:19 KST 2014 hyunsik@dbserver ~ $ Is your version either 0.9.0-SNAPSHOT or 0.8.0 release?
          Hide
          hyunsik Hyunsik Choi added a comment -

          Thank you for your reporting. I'll dig into it.

          Show
          hyunsik Hyunsik Choi added a comment - Thank you for your reporting. I'll dig into it.

            People

            • Assignee:
              hyunsik Hyunsik Choi
              Reporter:
              Christian Schwabe Christian Schwabe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Development