title: Subquery within Subquery is not working in hive
body: <p>I have a complexed query, I am giving the simplified version of it here. Would like to know why it is not working.</p>
  
  <pre><code>select * from ((select 1) t1 union (select 2) t2);
  </code></pre>
  
  <p>Getting the below error</p>
  
  <pre><code>NoViableAltException(290@[147:5: ( ( Identifier LPAREN )=&gt; partitionedTableFunction | tableSource | subQuerySource | virtualTableSource )])
  at org.antlr.runtime.DFA.noViableAlt(DFA.java:158)
  at org.antlr.runtime.DFA.predict(DFA.java:144)
  at org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.fromSource(HiveParser_FromClauseParser.java:3654)
  at org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.joinSource(HiveParser_FromClauseParser.java:1836)
  at org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.fromClause(HiveParser_FromClauseParser.java:1488)
  at org.apache.hadoop.hive.ql.parse.HiveParser.fromClause(HiveParser.java:44869)
  at org.apache.hadoop.hive.ql.parse.HiveParser.singleSelectStatement(HiveParser.java:42035)
  at org.apache.hadoop.hive.ql.parse.HiveParser.selectStatement(HiveParser.java:41720)
  at org.apache.hadoop.hive.ql.parse.HiveParser.regularBody(HiveParser.java:41657)
  at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpressionBody(HiveParser.java:40710)
  at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:40586)
  at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1529)
  at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1065)
  at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:201)
  at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
  at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:418)
  at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:312)
  at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1201)
  at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1296)
  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1127)
  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1115)
  at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:220)
  at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:172)
  at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:383)
  at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:775)
  at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:693)
  at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:628)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
  at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
  </code></pre>
  
  <p>FAILED: ParseException line 1:15 cannot recognize input near '(' '(' 'select' in from source</p>