Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-865

NullPointerException in getTables with PostgreSQL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      postgresql-9.3-1102-jdbc3.jar

      Description

      13:49 ~$ sqlline.calcite.postgresql 
      issuing: !connect jdbc:calcite:model=inline:{"version":1.0,"defaultSchema":"postgresql","schemas":[{"name":"postgresql","type":"jdbc","jdbcUrl":"jdbc:postgresql://XXX","jdbcUser":"XXX","jdbcPassword":"XXXX"}]} '' '' org.apache.calcite.jdbc.Driver
      Connecting to jdbc:calcite:model=inline:{"version":1.0,"defaultSchema":"postgresql","schemas":[{"name":"postgresql","type":"jdbc","jdbcUrl":"jdbc:postgresql://XXX","jdbcUser":"XXX","jdbcPassword":"XXX"}]}
      Connected to: Calcite (version 1.3.0-incubating-SNAPSHOT)
      Driver: Calcite JDBC Driver (version 1.3.0-incubating-SNAPSHOT)
      Autocommit status: true
      Transaction isolation: TRANSACTION_READ_UNCOMMITTED
      sqlline version 1.0.1 by Marc Prud'hommeaux
      0: jdbc:calcite:model=inline:{"version":1.0,"> select count(*) from "products";
      +---------+
      | EXPR$0  |
      +---------+
      | 10000   |
      +---------+
      1 row selected (1.239 seconds)
      0: jdbc:calcite:model=inline:{"version":1.0,"> !tables                         
      java.lang.NullPointerException
      	at org.apache.calcite.jdbc.CalciteMetaImpl$CalciteMetaTable.<init>(CalciteMetaImpl.java:619)
      	at org.apache.calcite.jdbc.CalciteMetaImpl$12.apply(CalciteMetaImpl.java:405)
      	at org.apache.calcite.jdbc.CalciteMetaImpl$12.apply(CalciteMetaImpl.java:401)
      	at org.apache.calcite.linq4j.EnumerableDefaults$6$1.current(EnumerableDefaults.java:1597)
      	at org.apache.calcite.linq4j.Linq4j$CompositeEnumerable$1.current(Linq4j.java:512)
      	at org.apache.calcite.linq4j.EnumerableDefaults$17$1.moveNext(EnumerableDefaults.java:2338)
      	at org.apache.calcite.linq4j.EnumerableDefaults$8$1.moveNext(EnumerableDefaults.java:1674)
      	at org.apache.calcite.linq4j.EnumerableDefaults$17$1.moveNext(EnumerableDefaults.java:2337)
      	at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:686)
      	at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:48)
      	at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:215)
      	at sqlline.SqlLine$BufferedRows.<init>(Unknown Source)
      	at sqlline.SqlLine.print(Unknown Source)
      	at sqlline.SqlLine$Commands.metadata(Unknown Source)
      	at sqlline.SqlLine$Commands.tables(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at sqlline.SqlLine$ReflectiveCommandHandler.execute(Unknown Source)
      	at sqlline.SqlLine.dispatch(Unknown Source)
      	at sqlline.SqlLine.begin(Unknown Source)
      	at sqlline.SqlLine.mainWithInputRedirection(Unknown Source)
      	at sqlline.SqlLine.main(Unknown Source)
      0: jdbc:calcite:model=inline:{"version":1.0,"> 
      

        Activity

        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/d69f2c20 .
        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Resolved in release 1.5.0 (2015-11-10)

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.5.0 (2015-11-10)

          People

          • Assignee:
            julianhyde Julian Hyde
            Reporter:
            mprudhom Marc Prud'hommeaux
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development