Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7076

NPE is logged when querying postgres tables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.16.0
    • 1.16.0
    • None
    • None

    Description

      NPE is seen in logs when querying PostgresĀ table:

      select 1 from postgres.public.tdt
      

      Stack trace from sqlline.log:

      2019-03-05 13:49:19,395 [23819dc0-abf8-24f3-ea81-6ced1b6e11af:foreman] WARN  o.a.d.e.p.common.DrillStatsTable - Failed to materialize the stats. Continuing without stats.
      java.lang.NullPointerException: null
      	at org.apache.drill.exec.planner.common.DrillStatsTable$StatsMaterializationVisitor.visit(DrillStatsTable.java:189) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.calcite.rel.SingleRel.childrenAccept(SingleRel.java:72) [calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
      	at org.apache.calcite.rel.RelVisitor.visit(RelVisitor.java:44) [calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
      	at org.apache.drill.exec.planner.common.DrillStatsTable$StatsMaterializationVisitor.visit(DrillStatsTable.java:202) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.calcite.rel.RelVisitor.go(RelVisitor.java:61) [calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
      	at org.apache.drill.exec.planner.common.DrillStatsTable$StatsMaterializationVisitor.materialize(DrillStatsTable.java:177) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel(DefaultSqlHandler.java:235) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:331) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:178) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan(DrillSqlWorker.java:204) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.convertPlan(DrillSqlWorker.java:114) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:80) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:584) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:272) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_191]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_191]
      	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
      

      But query runs and returns the correct result.

      Attachments

        Issue Links

          Activity

            People

              gparai Gautam Parai
              volodymyr Vova Vysotskyi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: