Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Function/UDF
    • Labels:
      None

      Description

      to_timestamp function converts an Unix epoch to a time stamp. We need to implement it.

      to_timestamp(double precision)
      
      1. TAJO-217_2.patch
        19 kB
        Hyunsik Choi
      2. TAJO-217.patch
        19 kB
        Hyunsik Choi

        Activity

        Hide
        hyunsik Hyunsik Choi added a comment -

        This work is a temporal resolution. TAJO-62 will resolve this issue.

        Show
        hyunsik Hyunsik Choi added a comment - This work is a temporal resolution. TAJO-62 will resolve this issue.
        Hide
        blrunner Jaehwa Jung added a comment -

        I applied the updated patch on the latest source version. But I failed 'mvn clean install' and I found the error message as follows:

        Results :
        
        Failed tests:   testUnixTimestamp(org.apache.tajo.engine.function.TestDateTime): select to_timestamp(unix_timestamp(), 'yyyyMMddHH'); expected:<[2013100902]> but was:<[1970011708]>
        
        Tests run: 374, Failures: 1, Errors: 0, Skipped: 0
        
        [INFO] ------------------------------------------------------------------------
        [INFO] Reactor Summary:
        [INFO] 
        [INFO] Tajo Main ......................................... SUCCESS [3.834s]
        [INFO] Tajo Project POM .................................. SUCCESS [3.225s]
        [INFO] Tajo Common ....................................... SUCCESS [10.030s]
        [INFO] Tajo Algebra ...................................... SUCCESS [2.988s]
        [INFO] Tajo Rpc .......................................... SUCCESS [17.553s]
        [INFO] Tajo Catalog Common ............................... SUCCESS [3.227s]
        [INFO] Tajo Catalog Client ............................... SUCCESS [0.911s]
        [INFO] Tajo Catalog Server ............................... SUCCESS [4.254s]
        [INFO] Tajo Core Storage ................................. SUCCESS [17.785s]
        [INFO] Tajo Core PullServer .............................. SUCCESS [0.888s]
        [INFO] Tajo Core Backend ................................. FAILURE [2:37.172s]
        [INFO] Tajo Core ......................................... SKIPPED
        [INFO] Tajo Catalog ...................................... SKIPPED
        [INFO] Tajo Distribution ................................. SKIPPED
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 3:42.417s
        [INFO] Finished at: Wed Oct 09 02:07:04 KST 2013
        [INFO] Final Memory: 32M/123M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project tajo-core-backend: There are test failures.
        [ERROR] 
        [ERROR] Please refer to ~/tajo-core/tajo-core-backend/target/surefire-reports for the individual test results.
        [ERROR] -> [Help 1]
        [ERROR] 
        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
        [ERROR] Re-run Maven using the -X switch to enable full debug logging.
        [ERROR] 
        [ERROR] For more information about the errors and possible solutions, please read the following articles:
        [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
        [ERROR] 
        [ERROR] After correcting the problems, you can resume the build with the command
        [ERROR]   mvn <goals> -rf :tajo-core-backend
        
        Show
        blrunner Jaehwa Jung added a comment - I applied the updated patch on the latest source version. But I failed 'mvn clean install' and I found the error message as follows: Results : Failed tests: testUnixTimestamp(org.apache.tajo.engine.function.TestDateTime): select to_timestamp(unix_timestamp(), 'yyyyMMddHH'); expected: <[2013100902]> but was: <[1970011708]> Tests run: 374, Failures: 1, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Tajo Main ......................................... SUCCESS [3.834s] [INFO] Tajo Project POM .................................. SUCCESS [3.225s] [INFO] Tajo Common ....................................... SUCCESS [10.030s] [INFO] Tajo Algebra ...................................... SUCCESS [2.988s] [INFO] Tajo Rpc .......................................... SUCCESS [17.553s] [INFO] Tajo Catalog Common ............................... SUCCESS [3.227s] [INFO] Tajo Catalog Client ............................... SUCCESS [0.911s] [INFO] Tajo Catalog Server ............................... SUCCESS [4.254s] [INFO] Tajo Core Storage ................................. SUCCESS [17.785s] [INFO] Tajo Core PullServer .............................. SUCCESS [0.888s] [INFO] Tajo Core Backend ................................. FAILURE [2:37.172s] [INFO] Tajo Core ......................................... SKIPPED [INFO] Tajo Catalog ...................................... SKIPPED [INFO] Tajo Distribution ................................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3:42.417s [INFO] Finished at: Wed Oct 09 02:07:04 KST 2013 [INFO] Final Memory: 32M/123M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project tajo-core-backend: There are test failures. [ERROR] [ERROR] Please refer to ~/tajo-core/tajo-core-backend/target/surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :tajo-core-backend
        Hide
        hyunsik Hyunsik Choi added a comment -

        I've uploaded the updated patch. unit_timestamp function in the previous one leads to wrong result. This patch fixes it.

        Show
        hyunsik Hyunsik Choi added a comment - I've uploaded the updated patch. unit_timestamp function in the previous one leads to wrong result. This patch fixes it.
        Hide
        hyunsik Hyunsik Choi added a comment -

        I've uploaded the patch.

        Show
        hyunsik Hyunsik Choi added a comment - I've uploaded the patch.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development