[JBoss JIRA] (TEIID-3378) Malformed query with SalesForce when Inner join used
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3378?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-3378.
---------------------------------
Labels: alpha1 (was: )
Resolution: Done
Fixed to create correct string representation of the query
> Malformed query with SalesForce when Inner join used
> ----------------------------------------------------
>
> Key: TEIID-3378
> URL: https://issues.jboss.org/browse/TEIID-3378
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Affects Versions: 8.9
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Labels: alpha1
> Fix For: 8.11
>
>
> There is "AND" clause missing after implicit "!= NULL" call
> {code}
> USER COMMAND:
> SELECT A.Name, O.Id FROM importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O WHERE (A.Id = O.AccountId) AND (A.OracleAccountNumber__c = '540840')
> ----------------------------------------------------------------------------
> OPTIMIZE:
> SELECT A.Name, O.Id FROM importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O WHERE (A.Id = O.AccountId) AND (A.OracleAccountNumber__c = '540840')
> ----------------------------------------------------------------------------
> GENERATE CANONICAL:
> SELECT A.Name, O.Id FROM importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O WHERE (A.Id = O.AccountId) AND (A.OracleAccountNumber__c = '540840')
> CANONICAL PLAN:
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id]})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840'})
> Select(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SELECT_CRITERIA=A.Id = O.AccountId})
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING PlaceAccess
> AFTER:
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id]})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840'})
> Select(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SELECT_CRITERIA=A.Id = O.AccountId})
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})
> Access(groups=[importVDBSrcModel.Account AS A], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000})
> Source(groups=[importVDBSrcModel.Account AS A])
> Access(groups=[importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000})
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING PushSelectCriteria
> AFTER:
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id]})
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId]})
> Access(groups=[importVDBSrcModel.Account AS A], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840'})
> Source(groups=[importVDBSrcModel.Account AS A])
> Access(groups=[importVDBSrcModel.Opportunity AS O])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING PushNonJoinCriteria
> AFTER:
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId]})
> Access(groups=[importVDBSrcModel.Account AS A])
> Select(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Account AS A])
> Access(groups=[importVDBSrcModel.Opportunity AS O])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING CleanCriteria
> AFTER:
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=null})
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=null})
> Access(groups=[importVDBSrcModel.Account AS A], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=null})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null})
> Source(groups=[importVDBSrcModel.Account AS A], props={OUTPUT_COLS=null})
> Access(groups=[importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=null})
> Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=null})
> ============================================================================
> EXECUTING RaiseAccess
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=null, CONFORMED_SOURCES=null})
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=null})
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null})
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=null})
> ============================================================================
> EXECUTING CopyCriteria
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, IS_COPIED=true})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null, IS_COPIED=true})
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING CleanCriteria
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=null, CONFORMED_SOURCES=null})
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=null})
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, IS_COPIED=true})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null, IS_COPIED=true})
> Source(groups=[importVDBSrcModel.Account AS A], props={OUTPUT_COLS=null})
> Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=null})
> ============================================================================
> EXECUTING PlanJoins
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Select(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING PushSelectCriteria
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null, IS_COPIED=true})
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING RaiseAccess
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Select(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING ChooseJoinStrategy
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Select(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING ChooseDependent
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Select(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING AssignOutputElements
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=[A.Name, O.Id], CONFORMED_SOURCES=null})
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=[A.Name, O.Id]})
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=[A.Name, O.Id], MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, IS_COPIED=true})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=[A.Id, A.Name], IS_COPIED=true})
> Source(groups=[importVDBSrcModel.Account AS A], props={OUTPUT_COLS=[A.OracleAccountNumber__c, A.Id, A.Name]})
> Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=[O.AccountId, O.Id]})
> ============================================================================
> EXECUTING CalculateCost
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=[A.Name, O.Id], CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0})
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=[A.Name, O.Id], EST_CARDINALITY=-1.0})
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=[A.Name, O.Id], MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, IS_COPIED=true, EST_CARDINALITY=-1.0})
> Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=[A.Id, A.Name], IS_COPIED=true, EST_CARDINALITY=-1.0})
> Source(groups=[importVDBSrcModel.Account AS A], props={OUTPUT_COLS=[A.OracleAccountNumber__c, A.Id, A.Name], EST_COL_STATS={A.OracleAccountNumber__c=[-1.0, -1.0], A.Id=[-1.0, -1.0], A.Name=[-1.0, -1.0]}, EST_CARDINALITY=-1.0})
> Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=[O.AccountId, O.Id], EST_COL_STATS={O.AccountId=[-1.0, -1.0], O.Id=[-1.0, -1.0]}, EST_CARDINALITY=-1.0})
> ============================================================================
> EXECUTING ImplementJoinStrategy
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Select(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING MergeCriteria
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Select(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING PlanSorts
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
> Select(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Account AS A])
> Source(groups=[importVDBSrcModel.Opportunity AS O])
> ============================================================================
> EXECUTING CollapseSource
> AFTER:
> Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=[A.Name, O.Id], CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0, ATOMIC_REQUEST=SELECT A.Name, O.Id FROM importVDBSrcModel.Account AS A INNER JOIN importVDBSrcModel.Opportunity AS O ON A.Id = O.AccountId WHERE A.OracleAccountNumber__c = '540840'})
> ============================================================================
> CONVERTING PLAN TREE TO PROCESS TREE
> PROCESS PLAN =
> AccessNode(0) output=[A.Name, O.Id] SELECT importVDBSrcModel.Account.Name, importVDBSrcModel.Opportunity.Id FROM importVDBSrcModel.Account INNER JOIN importVDBSrcModel.Opportunity ON importVDBSrcModel.Account.Id = importVDBSrcModel.Opportunity.AccountId WHERE importVDBSrcModel.Account.OracleAccountNumber__c = '540840'
> ============================================================================
> ----------------------------------------------------------------------------
> OPTIMIZATION COMPLETE:
> PROCESSOR PLAN:
> AccessNode(0) output=[A.Name, O.Id] SELECT importVDBSrcModel.Account.Name, importVDBSrcModel.Opportunity.Id FROM importVDBSrcModel.Account INNER JOIN importVDBSrcModel.Opportunity ON importVDBSrcModel.Account.Id = importVDBSrcModel.Opportunity.AccountId WHERE importVDBSrcModel.Account.OracleAccountNumber__c = '540840'
> ============================================================================
> 11:14:08,728 WARN [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue4) Connector worker process failed for atomic-request=KrZqiapoESB1.0.0.1: org.teiid.translator.TranslatorException: com.sforce.soap.partner.MalformedQueryFault: MALFORMED_QUERY:
> WHERE Opportunity.AccountId != NULLAccount.OracleAccountNumber__c
> ^
> ERROR at Row:1:Column:84
> Bind variables only allowed in Apex code
> at org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:162)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:325) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_65]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
> Caused by: javax.resource.ResourceException: com.sforce.soap.partner.MalformedQueryFault: MALFORMED_QUERY:
> WHERE Opportunity.AccountId != NULLAccount.OracleAccountNumber__c
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (TEIID-3378) Malformed query with SalesForce when Inner join used
by Ramesh Reddy (JIRA)
Ramesh Reddy created TEIID-3378:
-----------------------------------
Summary: Malformed query with SalesForce when Inner join used
Key: TEIID-3378
URL: https://issues.jboss.org/browse/TEIID-3378
Project: Teiid
Issue Type: Bug
Components: Salesforce Connector
Affects Versions: 8.9
Reporter: Ramesh Reddy
Assignee: Ramesh Reddy
Fix For: 8.11
There is "AND" clause missing after implicit "!= NULL" call
{code}
USER COMMAND:
SELECT A.Name, O.Id FROM importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O WHERE (A.Id = O.AccountId) AND (A.OracleAccountNumber__c = '540840')
----------------------------------------------------------------------------
OPTIMIZE:
SELECT A.Name, O.Id FROM importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O WHERE (A.Id = O.AccountId) AND (A.OracleAccountNumber__c = '540840')
----------------------------------------------------------------------------
GENERATE CANONICAL:
SELECT A.Name, O.Id FROM importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O WHERE (A.Id = O.AccountId) AND (A.OracleAccountNumber__c = '540840')
CANONICAL PLAN:
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id]})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840'})
Select(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SELECT_CRITERIA=A.Id = O.AccountId})
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING PlaceAccess
AFTER:
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id]})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840'})
Select(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SELECT_CRITERIA=A.Id = O.AccountId})
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})
Access(groups=[importVDBSrcModel.Account AS A], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000})
Source(groups=[importVDBSrcModel.Account AS A])
Access(groups=[importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000})
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING PushSelectCriteria
AFTER:
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id]})
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId]})
Access(groups=[importVDBSrcModel.Account AS A], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840'})
Source(groups=[importVDBSrcModel.Account AS A])
Access(groups=[importVDBSrcModel.Opportunity AS O])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING PushNonJoinCriteria
AFTER:
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId]})
Access(groups=[importVDBSrcModel.Account AS A])
Select(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Account AS A])
Access(groups=[importVDBSrcModel.Opportunity AS O])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING CleanCriteria
AFTER:
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=null})
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=null})
Access(groups=[importVDBSrcModel.Account AS A], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=null})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null})
Source(groups=[importVDBSrcModel.Account AS A], props={OUTPUT_COLS=null})
Access(groups=[importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=null})
Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=null})
============================================================================
EXECUTING RaiseAccess
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=null, CONFORMED_SOURCES=null})
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=null})
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null})
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=null})
============================================================================
EXECUTING CopyCriteria
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, IS_COPIED=true})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null, IS_COPIED=true})
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING CleanCriteria
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=null, CONFORMED_SOURCES=null})
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=null})
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, IS_COPIED=true})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null, IS_COPIED=true})
Source(groups=[importVDBSrcModel.Account AS A], props={OUTPUT_COLS=null})
Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=null})
============================================================================
EXECUTING PlanJoins
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Select(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING PushSelectCriteria
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=null, IS_COPIED=true})
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING RaiseAccess
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Select(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING ChooseJoinStrategy
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Select(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING ChooseDependent
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Select(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING AssignOutputElements
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=[A.Name, O.Id], CONFORMED_SOURCES=null})
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=[A.Name, O.Id]})
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=[A.Name, O.Id], MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, IS_COPIED=true})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=[A.Id, A.Name], IS_COPIED=true})
Source(groups=[importVDBSrcModel.Account AS A], props={OUTPUT_COLS=[A.OracleAccountNumber__c, A.Id, A.Name]})
Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=[O.AccountId, O.Id]})
============================================================================
EXECUTING CalculateCost
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=[A.Name, O.Id], CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0})
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={PROJECT_COLS=[A.Name, O.Id], OUTPUT_COLS=[A.Name, O.Id], EST_CARDINALITY=-1.0})
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[A.Id = O.AccountId], OUTPUT_COLS=[A.Name, O.Id], MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, IS_COPIED=true, EST_CARDINALITY=-1.0})
Select(groups=[importVDBSrcModel.Account AS A], props={SELECT_CRITERIA=A.OracleAccountNumber__c = '540840', OUTPUT_COLS=[A.Id, A.Name], IS_COPIED=true, EST_CARDINALITY=-1.0})
Source(groups=[importVDBSrcModel.Account AS A], props={OUTPUT_COLS=[A.OracleAccountNumber__c, A.Id, A.Name], EST_COL_STATS={A.OracleAccountNumber__c=[-1.0, -1.0], A.Id=[-1.0, -1.0], A.Name=[-1.0, -1.0]}, EST_CARDINALITY=-1.0})
Source(groups=[importVDBSrcModel.Opportunity AS O], props={OUTPUT_COLS=[O.AccountId, O.Id], EST_COL_STATS={O.AccountId=[-1.0, -1.0], O.Id=[-1.0, -1.0]}, EST_CARDINALITY=-1.0})
============================================================================
EXECUTING ImplementJoinStrategy
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Select(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING MergeCriteria
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Select(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING PlanSorts
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Project(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Join(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O])
Select(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Account AS A])
Source(groups=[importVDBSrcModel.Opportunity AS O])
============================================================================
EXECUTING CollapseSource
AFTER:
Access(groups=[importVDBSrcModel.Account AS A, importVDBSrcModel.Opportunity AS O], props={SOURCE_HINT=null, MODEL_ID=Schema name=importVDBSrcModel, nameInSource=null, uuid=tid:171d0fcff042-1eabba54-00000000, OUTPUT_COLS=[A.Name, O.Id], CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0, ATOMIC_REQUEST=SELECT A.Name, O.Id FROM importVDBSrcModel.Account AS A INNER JOIN importVDBSrcModel.Opportunity AS O ON A.Id = O.AccountId WHERE A.OracleAccountNumber__c = '540840'})
============================================================================
CONVERTING PLAN TREE TO PROCESS TREE
PROCESS PLAN =
AccessNode(0) output=[A.Name, O.Id] SELECT importVDBSrcModel.Account.Name, importVDBSrcModel.Opportunity.Id FROM importVDBSrcModel.Account INNER JOIN importVDBSrcModel.Opportunity ON importVDBSrcModel.Account.Id = importVDBSrcModel.Opportunity.AccountId WHERE importVDBSrcModel.Account.OracleAccountNumber__c = '540840'
============================================================================
----------------------------------------------------------------------------
OPTIMIZATION COMPLETE:
PROCESSOR PLAN:
AccessNode(0) output=[A.Name, O.Id] SELECT importVDBSrcModel.Account.Name, importVDBSrcModel.Opportunity.Id FROM importVDBSrcModel.Account INNER JOIN importVDBSrcModel.Opportunity ON importVDBSrcModel.Account.Id = importVDBSrcModel.Opportunity.AccountId WHERE importVDBSrcModel.Account.OracleAccountNumber__c = '540840'
============================================================================
11:14:08,728 WARN [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue4) Connector worker process failed for atomic-request=KrZqiapoESB1.0.0.1: org.teiid.translator.TranslatorException: com.sforce.soap.partner.MalformedQueryFault: MALFORMED_QUERY:
WHERE Opportunity.AccountId != NULLAccount.OracleAccountNumber__c
^
ERROR at Row:1:Column:84
Bind variables only allowed in Apex code
at org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:162)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:325) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_65]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.7.1.redhat-3.jar:8.7.1.redhat-3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: javax.resource.ResourceException: com.sforce.soap.partner.MalformedQueryFault: MALFORMED_QUERY:
WHERE Opportunity.AccountId != NULLAccount.OracleAccountNumber__c
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (TEIID-3377) NPE on initializing a GroupingNode when HAVING clause is used in an INSERT INTO query
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3377?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3377.
-----------------------------------
Resolution: Done
Adding the missing validation for the insert query expression.
> NPE on initializing a GroupingNode when HAVING clause is used in an INSERT INTO query
> -------------------------------------------------------------------------------------
>
> Key: TEIID-3377
> URL: https://issues.jboss.org/browse/TEIID-3377
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 7.7
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.11
>
>
> Running the following INSERT INTO query:
> {code:sql}
> INSERT INTO my.testInsert
> SELECT key_name, key_type FROM (select 'a' as key_name, 'b' as key_type) k HAVING count(*)>1
> {code}
> this exception is thrown:
> {code:sql}
> 16:50:55,081 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue0) Yh/8IUqIBLy9 TEIID30019 Unexpected exception for request Yh/8IUqIBLy9.0: java.lang.NullPointerException
> at org.teiid.query.processor.relational.GroupingNode.initialize(GroupingNode.java:218) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:96) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.initialize(RelationalPlan.java:91) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:226) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:455) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:265) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (TEIID-3377) NPE on initializing a GroupingNode when HAVING clause is used in an INSERT INTO query
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3377?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3377:
----------------------------------
Fix Version/s: 8.11
Affects Version/s: 7.7
Component/s: Query Engine
Forum Reference: https://developer.jboss.org/message/921080
> NPE on initializing a GroupingNode when HAVING clause is used in an INSERT INTO query
> -------------------------------------------------------------------------------------
>
> Key: TEIID-3377
> URL: https://issues.jboss.org/browse/TEIID-3377
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 7.7
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.11
>
>
> Running the following INSERT INTO query:
> {code:sql}
> INSERT INTO my.testInsert
> SELECT key_name, key_type FROM (select 'a' as key_name, 'b' as key_type) k HAVING count(*)>1
> {code}
> this exception is thrown:
> {code:sql}
> 16:50:55,081 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue0) Yh/8IUqIBLy9 TEIID30019 Unexpected exception for request Yh/8IUqIBLy9.0: java.lang.NullPointerException
> at org.teiid.query.processor.relational.GroupingNode.initialize(GroupingNode.java:218) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:96) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.initialize(RelationalPlan.java:91) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:226) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:455) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:265) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (TEIID-3377) NPE on initializing a GroupingNode when HAVING clause is used in an INSERT INTO query
by Salvatore R (JIRA)
Salvatore R created TEIID-3377:
----------------------------------
Summary: NPE on initializing a GroupingNode when HAVING clause is used in an INSERT INTO query
Key: TEIID-3377
URL: https://issues.jboss.org/browse/TEIID-3377
Project: Teiid
Issue Type: Bug
Reporter: Salvatore R
Assignee: Steven Hawkins
Running the following INSERT INTO query:
{code:sql}
INSERT INTO my.testInsert
SELECT key_name, key_type FROM (select 'a' as key_name, 'b' as key_type) k HAVING count(*)>1
{code}
this exception is thrown:
{code:sql}
16:50:55,081 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue0) Yh/8IUqIBLy9 TEIID30019 Unexpected exception for request Yh/8IUqIBLy9.0: java.lang.NullPointerException
at org.teiid.query.processor.relational.GroupingNode.initialize(GroupingNode.java:218) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:96) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.relational.RelationalPlan.initialize(RelationalPlan.java:91) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:226) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:455) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:265) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (TEIID-3346) File Source | Dot in file column names causes VDB deployment errors
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3346?page=com.atlassian.jira.plugin... ]
Work on TEIID-3346 started by Steven Hawkins.
---------------------------------------------
> File Source | Dot in file column names causes VDB deployment errors
> -------------------------------------------------------------------
>
> Key: TEIID-3346
> URL: https://issues.jboss.org/browse/TEIID-3346
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 7.7
> Reporter: Shiveeta Mattoo
> Assignee: Steven Hawkins
> Fix For: 8.11
>
>
> In case a Delimited Flat file , contains a "Dot" character in any of the column names, we get an issue during Virtual Data Base deployment -
> Root cause -
> org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered "'UTF-8') COLUMNS [*]\"name.full\"[*] STRING," at line 1, column 126.
> Invalid simple identifier format: [name.full]
>
> The query is : SELECT A."name.full",A."surname" FROM (EXEC tabwithdot.getFiles('tab.csv')) AS F, TEXTTABLE(TO_CHARS(F.file,'UTF-8') COLUMNS "name.full" STRING,"surname" STRING delimiter ' ' quote ' ' HEADER) AS A
>
> Please note, that although the column name [name.full], is enclosed in Double Quotes, still this issue is observed.
> If there was instead any other special character, that works successfully.
>
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (TEIID-3369) Add a extension point to manipulate incoming sql
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3369?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3369:
---------------------------------------
Add a PreParser hook with some light refactoring to make the command context available. Is this good enough of a start?
> Add a extension point to manipulate incoming sql
> ------------------------------------------------
>
> Key: TEIID-3369
> URL: https://issues.jboss.org/browse/TEIID-3369
> Project: Teiid
> Issue Type: Feature Request
> Components: JDBC Driver, Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.11
>
>
> We should look at adding a client or server extension point for manipulating sql - just the sql string, pre resolving. This will allow more flexibility in dealing with clients that don't send queries directly understood by Teiid. For example a select for update.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months