Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-674

ExplainLogicalPlan can cause NPE when a query includes derived tables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • 0.8.0, 0.9.0
    • Planner/Optimizer
    • None

    Description

      The reproduction query is as follows:

      SELECT distinct col1 FROM (SELECT * FROM col2 WHERE col3='2014-02-27') a
      

      Addition information is that col3 is a partition key.

      This query causes NPE as follows:

      HTTP ERROR: 500
      INTERNAL_SERVER_ERROR
      RequestURI=/querydetail.jsp
      Caused by:
      java.lang.NullPointerException
      at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitTableSubQuery(BasicLogicalPlanVisitor.java:230)
      at org.apache.tajo.engine.planner.ExplainLogicalPlanVisitor.visitTableSubQuery(ExplainLogicalPlanVisitor.java:169)
      at org.apache.tajo.engine.planner.ExplainLogicalPlanVisitor.visitTableSubQuery(ExplainLogicalPlanVisitor.java:29)
      at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:93)
      at org.apache.tajo.engine.planner.ExplainLogicalPlanVisitor.visitUnaryNode(ExplainLogicalPlanVisitor.java:115)
      at org.apache.tajo.engine.planner.ExplainLogicalPlanVisitor.visitGroupBy(ExplainLogicalPlanVisitor.java:108)
      at org.apache.tajo.engine.planner.ExplainLogicalPlanVisitor.visitGroupBy(ExplainLogicalPlanVisitor.java:29)
      at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:75)
      at org.apache.tajo.engine.planner.ExplainLogicalPlanVisitor.getBlockPlanStrings(ExplainLogicalPlanVisitor.java:71)
      at org.apache.tajo.engine.planner.PlannerUtil.buildExplainString(PlannerUtil.java:701)
      at org.apache.tajo.engine.planner.global.MasterPlan.toString(MasterPlan.java:263)
      at org.apache.jsp.querydetail_jsp._jspService(org.apache.jsp.querydetail_jsp:231)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      at org.mortbay.jetty.Server.handle(Server.java:324)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
      at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
      

      Attachments

        Activity

          People

            alvinhenrick Alvin Henrick
            hyunsik Hyunsik Choi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: