Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0-incubating
    • Fix Version/s: 1.3.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      During a CalciteMetaImpl#prepare execute from preparedStatement, the Signature Object created from parseQuery method is not being set into the created StatementHandle Object

      1. CALCITE-661-test.patch
        1 kB
        YeongWei
      2. CALCITE-661.patch
        1 kB
        YeongWei

        Activity

        Hide
        julianhyde Julian Hyde added a comment -

        I don't see why this code change is necessary. Can you provide a test case?

        Also, try it now that CALCITE-646 is fixed.

        Show
        julianhyde Julian Hyde added a comment - I don't see why this code change is necessary. Can you provide a test case? Also, try it now that CALCITE-646 is fixed.
        Hide
        yeongwei YeongWei added a comment -

        Hi Julian Hyde, CALCITE-661-test.patch is a test relatede to the patch, you should be able to see the following exception.

        Caused by: java.lang.NullPointerException
        at org.apache.calcite.avatica.remote.JsonService.finagle(JsonService.java:56)
        at org.apache.calcite.avatica.remote.JsonService.finagle(JsonService.java:92)
        at org.apache.calcite.avatica.remote.JsonService.finagle(JsonService.java:84)
        at org.apache.calcite.avatica.remote.JsonService.apply(JsonService.java:187)
        at org.apache.calcite.avatica.remote.RemoteMeta.prepare(RemoteMeta.java:145)
        at org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:274)
        ... 27 more

        Show
        yeongwei YeongWei added a comment - Hi Julian Hyde , CALCITE-661 -test.patch is a test relatede to the patch, you should be able to see the following exception. Caused by: java.lang.NullPointerException at org.apache.calcite.avatica.remote.JsonService.finagle(JsonService.java:56) at org.apache.calcite.avatica.remote.JsonService.finagle(JsonService.java:92) at org.apache.calcite.avatica.remote.JsonService.finagle(JsonService.java:84) at org.apache.calcite.avatica.remote.JsonService.apply(JsonService.java:187) at org.apache.calcite.avatica.remote.RemoteMeta.prepare(RemoteMeta.java:145) at org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:274) ... 27 more
        Hide
        julianhyde Julian Hyde added a comment -

        OK, so now we have a test case (proving that this is not a duplicate of CALCITE-646) and the fix makes the NPE go away. But now the statement returns 0 rows, because CalciteMetaImpl.fetch needs to be implemented.

        Show
        julianhyde Julian Hyde added a comment - OK, so now we have a test case (proving that this is not a duplicate of CALCITE-646 ) and the fix makes the NPE go away. But now the statement returns 0 rows, because CalciteMetaImpl.fetch needs to be implemented.
        Hide
        yeongwei YeongWei added a comment -

        There is this JdbcMeta.fetch, can you provide some insights on how these 2 fetch are differentiated? Or their respective intentions?

        Show
        yeongwei YeongWei added a comment - There is this JdbcMeta.fetch, can you provide some insights on how these 2 fetch are differentiated? Or their respective intentions?
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/01183de8 .
        Hide
        julianhyde Julian Hyde added a comment -

        To fetch rows on the client side you need to (a) fetch over an RPC, then the server needs to decode the JSON fetch request and somehow get rows on the server side by (b) call into the JDBC driver of the source system or (c) asking Calcite. So, the full request requires either (a) + (b) or (a) + (c).

        (a) is RemoteMeta.fetch; (b) is JdbcMeta.fetch, and (c) is CalciteMetaImpl.fetch.

        Show
        julianhyde Julian Hyde added a comment - To fetch rows on the client side you need to (a) fetch over an RPC, then the server needs to decode the JSON fetch request and somehow get rows on the server side by (b) call into the JDBC driver of the source system or (c) asking Calcite. So, the full request requires either (a) + (b) or (a) + (c). (a) is RemoteMeta.fetch; (b) is JdbcMeta.fetch, and (c) is CalciteMetaImpl.fetch.
        Hide
        julianhyde Julian Hyde added a comment -

        Resolved in release 1.3.0-incubating (2015-05-30).

        Show
        julianhyde Julian Hyde added a comment - Resolved in release 1.3.0-incubating (2015-05-30).

          People

          • Assignee:
            julianhyde Julian Hyde
            Reporter:
            yeongwei YeongWei
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development