tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyunsik Choi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TAJO-151) Multiple union queries within a table subquery causes NPE.
Date Tue, 03 Sep 2013 23:41:51 GMT
Hyunsik Choi created TAJO-151:
---------------------------------

             Summary: Multiple union queries within a table subquery causes NPE.
                 Key: TAJO-151
                 URL: https://issues.apache.org/jira/browse/TAJO-151
             Project: Tajo
          Issue Type: Bug
          Components: parser
            Reporter: Hyunsik Choi
            Assignee: Hyunsik Choi
             Fix For: 0.2-incubating


{noformat}
SELECT unioninput.*
FROM (
  select table1.key, table1.value
  FROM table1
  WHERE table1.key < 100
  UNION ALL
  SELECT table2.*
  FROM table2
  WHERE table2.key > 100
) unioninput
{noformat}

The above query causes the below error.

{noformat}
java.lang.NullPointerException
	at org.apache.tajo.algebra.RelationList.checkRelations(RelationList.java:33)
	at org.apache.tajo.algebra.RelationList.<init>(RelationList.java:27)
	at org.apache.tajo.engine.parser.SQLAnalyzer.visitFrom_clause(SQLAnalyzer.java:218)
	at org.apache.tajo.engine.parser.SQLAnalyzer.visitQuery_specification(SQLAnalyzer.java:154)
	at org.apache.tajo.engine.parser.SQLAnalyzer.visitQuery_specification(SQLAnalyzer.java:38)
	at org.apache.tajo.engine.parser.SQLParser$Query_specificationContext.accept(SQLParser.java:3201)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:68)
	at org.apache.tajo.engine.parser.SQLParserBaseVisitor.visitSimple_table(SQLParserBaseVisitor.java:295)
	at org.apache.tajo.engine.parser.SQLParser$Simple_tableContext.accept(SQLParser.java:2970)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:68)
	at org.apache.tajo.engine.parser.SQLParserBaseVisitor.visitNon_join_query_primary(SQLParserBaseVisitor.java:79)
	at org.apache.tajo.engine.parser.SQLAnalyzer.visitNon_join_query_term(SQLAnalyzer.java:117)
	at org.apache.tajo.engine.parser.SQLAnalyzer.visitNon_join_query_expression(SQLAnalyzer.java:72)
	at org.apache.tajo.engine.parser.SQLAnalyzer.visitNon_join_query_expression(SQLAnalyzer.java:38)
	at org.apache.tajo.engine.parser.SQLParser$Non_join_query_expressionContext.accept(SQLParser.java:2558)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:68)
	at org.apache.tajo.engine.parser.SQLParserBaseVisitor.visitQuery_expression_body(SQLParserBaseVisitor.java:615)
	at org.apache.tajo.engine.parser.SQLParser$Query_expression_bodyContext.accept(SQLParser.java:2478)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:68)
	at org.apache.tajo.engine.parser.SQLParserBaseVisitor.visitQuery_expression(SQLParserBaseVisitor.java:31)
	at org.apache.tajo.engine.parser.SQLParser$Query_expressionContext.accept(SQLParser.java:2432)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:68)
	at org.apache.tajo.engine.parser.SQLParserBaseVisitor.visitData_statement(SQLParserBaseVisitor.java:503)
	at org.apache.tajo.engine.parser.SQLParser$Data_statementContext.accept(SQLParser.java:1623)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:68)
	at org.apache.tajo.engine.parser.SQLParserBaseVisitor.visitStatement(SQLParserBaseVisitor.java:735)
	at org.apache.tajo.engine.parser.SQLParser$StatementContext.accept(SQLParser.java:1554)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:44)
	at org.apache.tajo.engine.parser.SQLAnalyzer.visitSql(SQLAnalyzer.java:66)
	at org.apache.tajo.engine.parser.TestHiveAnalyzer.parseQuery(TestHiveAnalyzer.java:45)
	at org.apache.tajo.engine.parser.TestHiveAnalyzer.testUnion1(TestHiveAnalyzer.java:271)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message