Bug 1272849 - HBase - Phoenix does not support nested select
HBase - Phoenix does not support nested select
Status: CLOSED CURRENTRELEASE
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ER1
: 6.3.0
Assigned To: Van Halbert
Juraj Duráni
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-19 01:33 EDT by Juraj Duráni
Modified: 2016-08-24 07:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-24 07:48:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker TEIID-3765 Major Closed HBase - Phoenix does not support scalar subquery 2016-06-15 06:31 EDT

  None (edit)
Description Juraj Duráni 2015-10-19 01:33:06 EDT
Description of problem:
Phoenix driver does not support nested SELECT statement. E.g. SELECT a, (SELECT...) ...

Steps to Reproduce:
SELECT a.intkey, (SELECT longnum FROM bqt1.smallb AS b WHERE a.intkey = b.intkey) FROM bqt1.smalla AS a

Source-specific command:
SELECT g_0.intkey, (SELECT g_1.longnum FROM smallb AS g_1 WHERE g_1.intkey = g_0.intkey) FROM smalla AS g_0

Exception
07:24:00,529 WARN  [org.teiid.CONNECTOR] (Worker5_QueryProcessorQueue42) Connector worker process failed for atomic-request=qvJ3png5LESA.16.2.7: org.teiid.translator.jdbc.JDBCExecutionException: 604 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, (SELECT g_1.longnum FROM smallb AS g_1 WHERE g_1.intkey = g_0.intkey) FROM smalla AS g_0]
	at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
	at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:329) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_40]
	at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
Caused by: org.apache.phoenix.exception.PhoenixParserException: ERROR 604 (42P00): Syntax error. Mismatched input. Expecting "LPAREN", got "SELECT" at line 1, column 21.
	at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
	at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
	at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1282)
	at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1363)
	at org.apache.phoenix.jdbc.PhoenixPreparedStatement.<init>(PhoenixPreparedStatement.java:95)
	at org.apache.phoenix.jdbc.PhoenixConnection.prepareStatement(PhoenixConnection.java:634)
	at org.apache.phoenix.jdbc.PhoenixConnection.prepareStatement(PhoenixConnection.java:660)
	at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:748)
	at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:734)
	at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:405)
	at org.teiid.translator.jdbc.JDBCBaseExecution.getPreparedStatement(JDBCBaseExecution.java:184)
	at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:121)
	... 12 more
Caused by: MismatchedTokenException(126!=90)
	at org.apache.phoenix.parse.PhoenixSQLParser.recoverFromMismatchedToken(PhoenixSQLParser.java:351)
	at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
	at org.apache.phoenix.parse.PhoenixSQLParser.not_expression(PhoenixSQLParser.java:6425)
	at org.apache.phoenix.parse.PhoenixSQLParser.and_expression(PhoenixSQLParser.java:6245)
	at org.apache.phoenix.parse.PhoenixSQLParser.or_expression(PhoenixSQLParser.java:6182)
	at org.apache.phoenix.parse.PhoenixSQLParser.expression(PhoenixSQLParser.java:6147)
	at org.apache.phoenix.parse.PhoenixSQLParser.not_expression(PhoenixSQLParser.java:6427)
	at org.apache.phoenix.parse.PhoenixSQLParser.and_expression(PhoenixSQLParser.java:6245)
	at org.apache.phoenix.parse.PhoenixSQLParser.or_expression(PhoenixSQLParser.java:6182)
	at org.apache.phoenix.parse.PhoenixSQLParser.expression(PhoenixSQLParser.java:6147)
	at org.apache.phoenix.parse.PhoenixSQLParser.selectable(PhoenixSQLParser.java:5209)
	at org.apache.phoenix.parse.PhoenixSQLParser.select_list(PhoenixSQLParser.java:5050)
	at org.apache.phoenix.parse.PhoenixSQLParser.single_select(PhoenixSQLParser.java:4315)
	at org.apache.phoenix.parse.PhoenixSQLParser.unioned_selects(PhoenixSQLParser.java:4432)
	at org.apache.phoenix.parse.PhoenixSQLParser.select_node(PhoenixSQLParser.java:4497)
	at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:765)
	at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:499)
	at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
	... 22 more
Comment 1 JBoss JIRA Server 2015-10-20 14:34:21 EDT
Steven Hawkins <shawkins@redhat.com> updated the status of jira TEIID-3765 to Resolved
Comment 2 JBoss JIRA Server 2016-01-27 16:25:02 EST
Steven Hawkins <shawkins@redhat.com> updated the status of jira TEIID-3765 to Closed

Note You need to log in before you can comment on or make changes to this bug.