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

JDBC driver should support TIMESTAMP type.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.9.0
    • Fix Version/s: 0.10.0
    • Component/s: Java Client, JDBC Driver
    • Labels:
      None

      Description

      Currently, Tajo JDBC driver does not support TIMESTAMP type. When a user gets a TIMESTAMP value, the error is caused as follows:

      org.apache.tajo.exception.UnsupportedException: Unrecognized column type:type: TIMESTAMP
      
              at org.apache.tajo.client.ResultSetUtil.toSqlType(ResultSetUtil.java:83)
              at org.apache.tajo.jdbc.TajoResultSetMetaData.getColumnTypeName(TajoResultSetMetaData.java:101)
              at com.gruter.taas.workbench.tajo.service.TajoService.getResultSetMetadata(TajoService.java:299)
              at com.gruter.taas.workbench.tajo.service.TajoService.getQueryResult(TajoService.java:384)
              at com.gruter.taas.workbench.tajo.service.TajoService.getQueryResult(TajoService.java:377)
              at com.gruter.taas.workbench.tajo.controller.TajoController.getQueryResult(TajoController.java:201)
              at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:212)
              at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
              at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
      

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user blrunner opened a pull request:

        https://github.com/apache/tajo/pull/208

        TAJO-1119: JDBC driver should support TIMESTAMP type.

        TAJO-1119: JDBC driver should support TIMESTAMP type.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/blrunner/tajo TAJO-1119

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/208.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #208


        commit 7831212dbc11953976450f0569045bd11b27ead2
        Author: Jaehwa Jung <blrunner@apache.org>
        Date: 2014-10-24T01:02:22Z

        TAJO-1119: JDBC driver should support TIMESTAMP type.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user blrunner opened a pull request: https://github.com/apache/tajo/pull/208 TAJO-1119 : JDBC driver should support TIMESTAMP type. TAJO-1119 : JDBC driver should support TIMESTAMP type. You can merge this pull request into a Git repository by running: $ git pull https://github.com/blrunner/tajo TAJO-1119 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/208.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #208 commit 7831212dbc11953976450f0569045bd11b27ead2 Author: Jaehwa Jung <blrunner@apache.org> Date: 2014-10-24T01:02:22Z TAJO-1119 : JDBC driver should support TIMESTAMP type.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-60454791

        The patch looks good to me.

        But, this patch seems to omit the test to retrieve values. Could you add more unit tests to get timestamp values from JDBC ResultSet?

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-60454791 The patch looks good to me. But, this patch seems to omit the test to retrieve values. Could you add more unit tests to get timestamp values from JDBC ResultSet?
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-62633063

        Hi @blrunner,

        I think this fix should be included in 0.9.1. How do you think about that?

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-62633063 Hi @blrunner, I think this fix should be included in 0.9.1. How do you think about that?
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-62831834

        Hi @hyunsik

        NP... I'll add more unit test cases by tomorrow night.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-62831834 Hi @hyunsik NP... I'll add more unit test cases by tomorrow night.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-63255740

        Hi @hyunsik

        I added a unit test case to verify ResultSet.
        Could you check the patch again?

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-63255740 Hi @hyunsik I added a unit test case to verify ResultSet. Could you check the patch again?
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-63257624

        TravisCI causes the following error. Could you check it? or could you submit the patch to jira and trigger the jenkins unit test?
        ```
        Results :
        Failed tests:
        TestJoinQuery.testOuterJoinAndCaseWhen1:314->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed.
        TestJoinQuery.testOuterJoinAndCaseWhen1:314->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed.
        TestJoinQuery.testOuterJoinAndCaseWhen1:314->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed.
        TestJoinQuery.testOuterJoinAndCaseWhen1:314->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed.
        TestSortQuery.testSortWithDate:134->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed.
        Tests in error:
        TestGroupByQuery.testGroupByWithNullData5:586->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData6:598->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData7:610->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData8:622->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData9:634->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData5:586->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData6:598->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData7:610->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData8:622->QueryTestCaseBase.executeString:293 » Service
        TestGroupByQuery.testGroupByWithNullData9:634->QueryTestCaseBase.executeString:293 » Service
        TestJoinBroadcast.testLeftOuterJoinLeftSideSmallTable:590 » Service java.sql.S...
        ```

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-63257624 TravisCI causes the following error. Could you check it? or could you submit the patch to jira and trigger the jenkins unit test? ``` Results : Failed tests: TestJoinQuery.testOuterJoinAndCaseWhen1:314->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed. TestJoinQuery.testOuterJoinAndCaseWhen1:314->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed. TestJoinQuery.testOuterJoinAndCaseWhen1:314->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed. TestJoinQuery.testOuterJoinAndCaseWhen1:314->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed. TestSortQuery.testSortWithDate:134->QueryTestCaseBase.executeDDL:544->QueryTestCaseBase.executeDDL:572 Table [table1] creation is failed. Tests in error: TestGroupByQuery.testGroupByWithNullData5:586->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData6:598->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData7:610->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData8:622->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData9:634->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData5:586->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData6:598->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData7:610->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData8:622->QueryTestCaseBase.executeString:293 » Service TestGroupByQuery.testGroupByWithNullData9:634->QueryTestCaseBase.executeString:293 » Service TestJoinBroadcast.testLeftOuterJoinLeftSideSmallTable:590 » Service java.sql.S... ```
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-63444349

        Hi @hyunsik

        I fixed a bug. The Travis CI build will build successfully tonight.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-63444349 Hi @hyunsik I fixed a bug. The Travis CI build will build successfully tonight.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-63444869

        Thank you for your contribution. I'll review the patch soon.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-63444869 Thank you for your contribution. I'll review the patch soon.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-64325958

        +1

        Ship it. The patch looks good to me.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-64325958 +1 Ship it. The patch looks good to me.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner closed the pull request at:

        https://github.com/apache/tajo/pull/208

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner closed the pull request at: https://github.com/apache/tajo/pull/208
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/208#issuecomment-64795740

        Thanks @hyunsik.
        I've just committed it to master branch.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/208#issuecomment-64795740 Thanks @hyunsik. I've just committed it to master branch.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #470 (See https://builds.apache.org/job/Tajo-master-build/470/)
        TAJO-1119: JDBC driver should support TIMESTAMP type. (jaehwa) (blrunner: rev 7d41c67ca94493e38c67e62663dc097358a18539)

        • tajo-core/src/test/resources/queries/TestTajoJdbc/create_table_with_date_ddl.sql
        • tajo-core/src/test/resources/dataset/TestTajoJdbc/table1/table1.tbl
        • tajo-core/src/test/resources/results/TestTajoJdbc/testSortWithDateTime.result
        • CHANGES
        • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/MetaDataTuple.java
        • tajo-client/src/main/java/org/apache/tajo/client/ResultSetUtil.java
        • tajo-core/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #470 (See https://builds.apache.org/job/Tajo-master-build/470/ ) TAJO-1119 : JDBC driver should support TIMESTAMP type. (jaehwa) (blrunner: rev 7d41c67ca94493e38c67e62663dc097358a18539) tajo-core/src/test/resources/queries/TestTajoJdbc/create_table_with_date_ddl.sql tajo-core/src/test/resources/dataset/TestTajoJdbc/table1/table1.tbl tajo-core/src/test/resources/results/TestTajoJdbc/testSortWithDateTime.result CHANGES tajo-jdbc/src/main/java/org/apache/tajo/jdbc/MetaDataTuple.java tajo-client/src/main/java/org/apache/tajo/client/ResultSetUtil.java tajo-core/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #111 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/111/)
        TAJO-1119: JDBC driver should support TIMESTAMP type. (jaehwa) (blrunner: rev 7d41c67ca94493e38c67e62663dc097358a18539)

        • tajo-core/src/test/resources/queries/TestTajoJdbc/create_table_with_date_ddl.sql
        • tajo-core/src/test/resources/results/TestTajoJdbc/testSortWithDateTime.result
        • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/MetaDataTuple.java
        • tajo-client/src/main/java/org/apache/tajo/client/ResultSetUtil.java
        • CHANGES
        • tajo-core/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
        • tajo-core/src/test/resources/dataset/TestTajoJdbc/table1/table1.tbl
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #111 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/111/ ) TAJO-1119 : JDBC driver should support TIMESTAMP type. (jaehwa) (blrunner: rev 7d41c67ca94493e38c67e62663dc097358a18539) tajo-core/src/test/resources/queries/TestTajoJdbc/create_table_with_date_ddl.sql tajo-core/src/test/resources/results/TestTajoJdbc/testSortWithDateTime.result tajo-jdbc/src/main/java/org/apache/tajo/jdbc/MetaDataTuple.java tajo-client/src/main/java/org/apache/tajo/client/ResultSetUtil.java CHANGES tajo-core/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java tajo-core/src/test/resources/dataset/TestTajoJdbc/table1/table1.tbl

          People

          • Assignee:
            blrunner Jaehwa Jung
            Reporter:
            hyunsik Hyunsik Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development