[JBoss JIRA] (TEIID-4619) left join returns wrong results
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4619?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4619.
-----------------------------------
Fix Version/s: (was: 9.2.1)
Resolution: Duplicate Issue
Resolving as a duplicate.
> left join returns wrong results
> -------------------------------
>
> Key: TEIID-4619
> URL: https://issues.jboss.org/browse/TEIID-4619
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 9.0.4, 9.0.5
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Priority: Critical
> Attachments: correct_result.txt, enclosed_queryplan.txt, query1_enclosed_plan.txt, query1_plan.txt, query2_plan.txt, teiid_reduced_case.txt, wrong_result.txt
>
>
> I have the following situation.
> I have a temporary table #tmp_admissions that contains 8047 rows.
> In this first query there are 66290 results. However if I only look at the lines for infectionid 880 then there are only 16 lines.
> {code:sql}
> select l.infectionid, l.id as linkid, lc.linkcultureid, lc.responsibleculture, lc.culturealternative, cl.sampleinsertts, cl.specimennumber,
> cl.culturenumber, cl.culturename, cl.quotation, ls.material, ls.sampletime,
> abr.culturenumber as abgram_culturenumber,abr.antibiogrampart, abr.resisttype,
> lc.antibiogramculturenr,lc.antibiogramspecimennr,lc.antibiogramsampleinsertts
> from #tmp_admissions adm
> join cos2_links l on l.admissionid = cast(adm.patientid as string)
> join cos2_link_culture lc on lc.linkid = l.id
> left join cos2_lab_culture cl on cl.culturenumber = lc.culturenr and cl.specimennumber = lc.culturespecimennr and cl.sampleinsertts = lc.culturesampleinsertts
> left join cos2_lab_sample ls on ls.inserttime = cl.sampleinsertts and ls.specimennumber = cl.specimennumber
> left join cos2_antibiogramresistences abr on abr.specimennumber = cl.specimennumber and abr.culturenumber = cl.culturenumber and abr.sampleinsertts = cl.sampleinsertts
> {code}
> This query does almost the same but returns 30 rows (and is correct).
> {code:sql}
> select l.infectionid, l.id as linkid, lc.linkcultureid, lc.responsibleculture, lc.culturealternative, cl.sampleinsertts, cl.specimennumber,
> cl.culturenumber, cl.culturename, cl.quotation, ls.material, ls.sampletime,
> abr.culturenumber as abgram_culturenumber,abr.antibiogrampart, abr.resisttype,
> lc.antibiogramculturenr,lc.antibiogramspecimennr,lc.antibiogramsampleinsertts
> from cos2_links l
> join cos2_link_culture lc on lc.linkid = l.id
> left join cos2_lab_culture cl on cl.culturenumber = lc.culturenr and cl.specimennumber = lc.culturespecimennr and cl.sampleinsertts = lc.culturesampleinsertts
> left join cos2_lab_sample ls on ls.inserttime = cl.sampleinsertts and ls.specimennumber = cl.specimennumber
> left join cos2_antibiogramresistences abr on abr.specimennumber = cl.specimennumber and abr.culturenumber = cl.culturenumber and abr.sampleinsertts = cl.sampleinsertts
> where l.infectionid = 880
> {code}
> cos2_link_culture contains 2 rows for this infectionid. The left join statements should result in 15 rows for both rows. However the left join results in the first query for the first row are null and to my understanding ignored. I'll attach the query plans for both queries.
> I should note that there is a one to many relation between infection and admission so therefore infectionid is for the same admission.
> Strangely enough if you enclode the first query in a group by query and count the rows it does indeed return 2 times 15 for the specific groups (see enclosed_queryplan.txt).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 10 months
[JBoss JIRA] (TEIID-4709) Enable JDG resource adapter to pass the username/password to HotRod Client
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4709?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4709:
------------------------------------
Here's an example used in testing:
{code}
<resource-adapter id="ispnHotrod">
<module slot="main" id="org.jboss.teiid.resource-adapter.infinispan.dsl"/>
<connection-definitions>
<connection-definition class-name="org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory" jndi-name="java:/PersonJDGSource" enabled="true" use-java-context="true" pool-name="infinispanHotRodDS" use-ccm="true" >
<config-property name="MessageDescriptor">
quickstart.Person
</config-property>
<config-property name="AuthApplicationRealm">
ApplicationRealm
</config-property>
<config-property name="MessageMarshallers"> com.client.quickstart.addressbook.pojos.domain.Person:com.client.quickstart.addressbook.pojos.marshallers.PersonMarshaller,com.client.quickstart.addressbook.pojos.domain.Address:com.client.quickstart.addressbook.pojos.marshallers.AddressMarshaller,com.client.quickstart.addressbook.pojos.domain.PhoneNumber:com.client.quickstart.addressbook.pojos.marshallers.PhoneNumberMarshaller
</config-property>
<config-property name="AuthServerName">
myhotrodserver
</config-property>
<config-property name="AuthSASLMechanism">
DIGEST-MD5
</config-property>
<config-property name="Module">
com.client.quickstart.addressbook.pojos
</config-property>
<config-property name="RemoteServerList">
127.0.0.1:11322
</config-property>
<config-property name="ProtobufDefinitionFile">
/quickstart/addressbook.proto
</config-property>
<config-property name="AdminPassword">
redhat1!
</config-property>
<config-property name="AdminUserName">
teiidUser
</config-property>
<config-property name="AuthUserName">
teiidUser
</config-property>
<config-property name="AuthPassword">
redhat1!
</config-property>
<config-property name="CacheTypeMap">
datasourceCache:com.client.quickstart.addressbook.pojos.domain.Person;id
</config-property>
<security><security-domain-and-application>teiid-security</security-domain-and-application></security>
</connection-definition>
</connection-definitions>
</resource-adapter>
{code}
> Enable JDG resource adapter to pass the username/password to HotRod Client
> --------------------------------------------------------------------------
>
> Key: TEIID-4709
> URL: https://issues.jboss.org/browse/TEIID-4709
> Project: Teiid
> Issue Type: Feature Request
> Components: JDG Connector
> Affects Versions: 9.3
> Reporter: Van Halbert
> Assignee: Van Halbert
> Fix For: 9.3, 8.12.9.6_3
>
>
> Enable the JDG resource adapter to pass the username/password to the JDG hot rod client.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 10 months
[JBoss JIRA] (TEIID-3624) No way to associate enterprise data types in dynamic vdb constructs
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3624?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3624:
---------------------------------------
The initial commit is in. This is for database level domains only. For legacy vdbs and even internal use, we'll parse the vdb property domains-ddl to add domains to a non-dll vdb. Designer may need to take advantage of that as well.
The databasemetadata logic for columns and types was pushed more to the server side - and the legacy methods were preserved for connecting to older servers. The client will not report the expected metadata unless it is upgraded.
TODO:
* validate domain array behavior - we'll want proper support for domain[] - but we don't necessarily need to support defining a domain as an array
* cast support
> No way to associate enterprise data types in dynamic vdb constructs
> -------------------------------------------------------------------
>
> Key: TEIID-3624
> URL: https://issues.jboss.org/browse/TEIID-3624
> Project: Teiid
> Issue Type: Enhancement
> Components: Grammar, Query Engine
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Fix For: 9.3
>
>
> I don't find any doc's on how to define enterprise data types in a dynamic vdb.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 10 months