[JBoss JIRA] (TEIID-4406) group by cast(... as date) results in NullPointException
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4406?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-4406.
---------------------------------
> group by cast(... as date) results in NullPointException
> --------------------------------------------------------
>
> Key: TEIID-4406
> URL: https://issues.jboss.org/browse/TEIID-4406
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.0.2
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Fix For: 9.1, 9.0.4
>
> Attachments: plan_cast.txt, plan_nocast.txt
>
>
> example query:
> select oc.patientid, cast(oc.StartOfPeriod as date) as periodstart,
> max(case when variableid = 10001001 then oc.Value end) as sofa_resp,
> max(case when variableid = 10001002 then oc.Value end) as sofa_cardio,
> max(case when variableid = 10001003 then oc.Value end) as sofa_liver,
> max(case when variableid = 10001004 then oc.Value end) as sofa_coag,
> max(case when variableid = 10001005 then oc.Value end) as sofa_cns,
> max(case when variableid = 10001006 then oc.Value end) as sofa_renal,
> max(case when variableid = 30010000 then oc.Value end) as sofa_total
> from #tmp_cohort10 c
> join oldcos_scores oc on oc.PatientID = c.patientid
> group by oc.patientid, cast(oc.StartOfPeriod as date)
> stacktrace:
> 2016-08-23 11:46:25,263 ERROR [org.teiid.PROCESSOR] (Worker50_QueryProcessorQueue784) BCXKsyPCGz6r TEIID30019 Unexpected exception for request BCXKsyPCGz6r.148: java.lang.NullPointerException
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:426)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:418)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:281)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:226)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:386)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:344)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:276)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:184)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.<init>(ConnectorWorkItem.java:175)
> at org.teiid.dqp.internal.datamgr.ConnectorManager.registerRequest(ConnectorManager.java:203)
> at org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:1011)
> at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:179)
> at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:500)
> at org.teiid.query.processor.relational.AccessNode.openInternal(AccessNode.java:268)
> at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:171)
> at org.teiid.query.processor.relational.JoinStrategy.openRight(JoinStrategy.java:105)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:223)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
> at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v7.2.2#72004)
8 years, 1 month
[JBoss JIRA] (TEIID-4034) Google spreadsheet translator issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4034?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-4034.
---------------------------------
> Google spreadsheet translator issues
> ------------------------------------
>
> Key: TEIID-4034
> URL: https://issues.jboss.org/browse/TEIID-4034
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.3
> Reporter: Marco Ardito
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.2
>
>
> The GoogleJSONParser has handling for javascript dates, but only of the form new Date(...)
> However the data result uses datetime/date values that are actually string literals of the form
> "Date(...)"
> Also the time format is an array of numbers:
> [1,2,3,4]
> The translator needs to account for all of these.
> Additionally:
> - support for ClientLogin should be removed as it is no longer allowed by google.
> - there is a collision between resource bundles as they are in the same package between the connector and api modules.
--
This message was sent by Atlassian JIRA
(v7.2.2#72004)
8 years, 1 month
[JBoss JIRA] (TEIID-4461) Salesforce translator - foreign tables does not support query statements by default
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4461?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-4461.
---------------------------------
> Salesforce translator - foreign tables does not support query statements by default
> -----------------------------------------------------------------------------------
>
> Key: TEIID-4461
> URL: https://issues.jboss.org/browse/TEIID-4461
> Project: Teiid
> Issue Type: Quality Risk
> Components: Salesforce Connector
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 9.1
>
>
> If salesforce objects are modeled in VDB using DDL metadata (CREATE FOREIGN TABLE...), user cannot select data from them by default. See VDB \[1\], RA definition \[2\] and exception \[3\].
> *SELECT * FROM sfSourceProp.Pricebook2* -> OK
> *SELECT * FROM sfSourceNative.Pricebook2* -> OK
> *SELECT * FROM sfSource.Pricebook2* ->fail \[3\]
> {code:xml|title=\[1\] VDB}
> <vdb name="salesforce-test" version="1">
> <model name="sfSourceNative" type="PHYSICAL">
> <source name="sfnative" translator-name="salesforce-34" connection-jndi-name="java:/salesforce"/>
> <metadata type="NATIVE"/>
> </model>
> <model name="sfSource" type="PHYSICAL">
> <source name="sf" translator-name="salesforce-34" connection-jndi-name="java:/salesforce"/>
> <metadata type="DDL"><![CDATA[CREATE FOREIGN TABLE Pricebook2 (Id string, Name string, IsActive boolean, IsStandard boolean, Description string, IsDeleted boolean) OPTIONS (UPDATABLE 'TRUE');]]>
> </metadata>
> </model>
> <model name="sfSourceProp" type="PHYSICAL">
> <source name="sfprop" translator-name="salesforce-34" connection-jndi-name="java:/salesforce"/>
> <metadata type="DDL"><![CDATA[CREATE FOREIGN TABLE Pricebook2 (Id string, Name string, IsActive boolean, IsStandard boolean, Description string, IsDeleted boolean) OPTIONS (UPDATABLE 'TRUE', "{http://www.teiid.org/translator/salesforce/2012}Supports Query" 'TRUE');]]>
> </metadata>
> </model>
> </vdb>
> {code}
> {code:xml|title=\[2\] Resource adapter}
> <resource-adapter id="salesforce-ds">
> <module slot="main" id="org.jboss.teiid.resource-adapter.salesforce-34"/>
> <transaction-support>NoTransaction</transaction-support>
> <connection-definitions>
> <connection-definition class-name="org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory" jndi-name="java:/salesforce" enabled="true" use-java-context="true" pool-name="salesforce-ds">
> <config-property name="password">
> secretplustoken
> </config-property>
> <config-property name="URL">
> https://www.salesforce.com/services/Soap/u/34.0
> </config-property>
> <config-property name="username">
> user(a)example.com
> </config-property>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> {code}
> {code:plain|title=\[3\] Exception}
> 12:33:22,178 WARN [org.teiid.PROCESSOR] (Worker6_QueryProcessorQueue85) TEIID30020 Processing exception for request EmUpFy4HxjNz.0 'TEIID30504 sf: Pricebook2 does not support the query statement.'. Originally TeiidProcessingException SelectVisitor.java:129.: org.teiid.core.TeiidProcessingException: TEIID30504 sf: Pricebook2 does not support the query statement.
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> Caused by: org.teiid.translator.TranslatorException: Pricebook2 does not support the query statement.
> at org.teiid.translator.salesforce.execution.visitors.SelectVisitor.visit(SelectVisitor.java:129)
> at org.teiid.language.NamedTable.acceptVisitor(NamedTable.java:66) [teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNodes(AbstractLanguageVisitor.java:63) [teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.translator.salesforce.execution.visitors.SelectVisitor.visit(SelectVisitor.java:58)
> at org.teiid.language.Select.acceptVisitor(Select.java:110) [teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:138)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) [:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 6 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.2#72004)
8 years, 1 month