[teiid-users] unexpected query results against XML data source

Ramesh Reddy rareddy at redhat.com
Wed Sep 2 11:35:40 EDT 2009


Mike, note that with 6.2.0 M2 snapshot (v20090820) version you will run
into the NPE issues I was mentioning. We will get this fixed for 6.2
stable release.

Ramesh..

On Wed, 2009-09-02 at 08:18 -0700, Mike Mascari wrote:
> That's excellent news. I had grabbed the 6.2.0 M2 snapshot (v20090820)
> of teiid-designer. 
> 
> 
> - Mike
> 
> 
> ______________________________________________________________________
> From: John Doyle <jdoyle at redhat.com>
> To: Mike Mascari <mascarim at yahoo.com>
> Cc: teiid-users at lists.jboss.org
> Sent: Wednesday, September 2, 2009 10:47:54 AM
> Subject: Re: [teiid-users] unexpected query results against XML data
> source
> 
> Mike,
> 
> The defect you've uncovered isn't the same as TEIID-93, it's much
> simpler and obvious.  I'm checking in a change for 6.2 today.  Are you
> working with 6.2 or 6.1?
> 
> ~jd
> ----- "Mike Mascari" <mascarim at yahoo.com> wrote: 
> > 
> > 
> I've attached both the xml and the xsd used and re-tested the
> importation and query against them with the same result. Thanks for
> looking into it! Could it be the same issue as this:
> 
> > 
> https://jira.jboss.org/jira/browse/TEIID-93
> 
> > 
> ??
> 
> > 
> My issue is a much simpler case, however. The query needn't be pushed
> down as apart of the planner over a federated view to cause the
> irregularity -- one need only query the XML source directly. 
> 
> > 
> Thanks again!
> 
> > 
> And just for giggles:
> 
> > 
> # xmllint --schema clients.xsd clients.xml 
> <?xml version="1.0" encoding="UTF-8"?>
> <clients>
>   <client>
>     <name>acme</name>
>     <rate>15</rate>
>   </client>
>   <client>
>     <name>toolwerks</name>
>     <rate>20</rate>
>   </client>
> </clients>
> clients.xml validates
> 
> > 
> :-)
> 
> > 
> - Mike
> > 
> > 
> > 
> ______________________________________________________________________
> From: John Doyle <jdoyle at redhat.com>
> > To: Mike Mascari <mascarim at yahoo.com>
> > Cc: teiid-users at lists.jboss.org
> > Sent: Tuesday, September 1, 2009 11:48:24 AM
> > Subject: Re: [teiid-users] unexpected query results against XML data
> source
> > 
> > 
> > Hi Mike,
> > 
> > I've tried to reproduce this but get no root elements to select from
> during the import process.  Is it possible that the XSD pasted here is
> different from what you're using?
> > 
> > ~jd
> > ----- "Mike Mascari" <mascarim at yahoo.com> wrote: 
> > > 
> > > 
> Hello. I've downloaded and installed the snapshot as of today
> (8/31/2009) and, using the designer:
> 
> > > 
> 1. Used Import->XML Schema as Relational Source Model
> 
> > > 
> 2. Selected Document over HTTP with no request parameters
> 
> > > 
> 3. Selected No Catalog
> 
> > > 
> 4. Chose "File System" as source of XML Schema (inlined below)
> 
> > > 
> 5. Chose "client" (I've tried w/"clients" as well) as the root element
> and "Finish"
> 
> > > 
> 6. Create a "purchasing" View Model and, with "purchasing" selected,
> created an "example" BaseTable. I then drag-and-drop "client" from
> clients.xmi Source Model into SOURCES pane. (This View abstraction
> turns out not to be the problem -- I query the Source via the
> Execute'd VDB with the same outcome.)
> 
> > > 
> 7. Created a "billing" vdb, cleaned, built, and synchronized.
> 
> > > 
> 8. Then, with this data served up by apache:
> 
> > > 
> <?xml version="1.0" encoding="UTF-8"?>
> <clients>
>   <client>
>     <name>acme</name>
>     <rate>15</rate>
>   </client>
>   <client>
>     <name>toolwerks</name>
>     <rate>20</rate>
>   </client>
> </clients>
> 
> > > 
> I issued the following query:
> 
> > > 
> select * from clients.client
> 
> > > 
> and received the expected result:
> 
> > > 
> null;acme;15
> null;toolwerks;20
> 
> > > 
> 9. Then I did this:
> 
> > > 
> select * from clients.client where name = 'acme'
> 
> > > 
> and received *two rows*:
> 
> > > 
> null;acme;15
> null;toolwerks;20
> 
> > > 
> 10. So I did this:
> 
> > > 
> select * from clients.client where name != 'acme' 
> 
> > > 
> and received the expected one row:
> 
> > > 
> null;toolwerks;20
> 
> > > 
> ???
> 
> > > 
> Is there something goofy with the equality operator against XML data?
> Is there flag that needs flipped on these attributes? I went with the
> "string" mapping on the 'XML Schema as Relational Source Model' dialog
> wizard (pane 4 IIRC). Oughtn't I have? I also changed XML node names
> that might have been SQL keywords ('name' -> 'fullname') but no
> dice...
> 
> > > 
> Thoughts? 
> 
> > > 
> - Mike
> 
> > > 
> Schema:
> 
> > > 
> <?xml version="1.0"?>
> 
> 
> > > 
>   <!-- our client database -->
> 
> > > 
>   <xs:element name="clients">
>   
>     <xs:complexType>
>       <xs:sequence>
> 
> > > 
>         <!-- the client -->
>               
>         <xs:element name="client" minOccurs="1" maxOccurs="unbounded">
>           <xs:complexType>
>             <xs:sequence>
> 
> > > 
>               <!-- client name -->
> 
> > > 
>               <xs:element name="name" type="xs:string" minOccurs="1"
> maxOccurs="1"/>
> 
> > > 
>               <!-- bill rate -->
> 
> > > 
>               <xs:element name="rate" minOccurs="0">
>                 <xs:simpleType>
>                   <xs:restriction base="xs:decimal">
>                     <xs:minInclusive value="50"/>
>                     <xs:maxInclusive value="250"/>
>                   </xs:restriction>
>                 </xs:simpleType>
>               </xs:element>
> 
> > > 
>             </xs:sequence>
> 
> > > 
>           </xs:complexType>
> 
> > > 
>         </xs:element>
> 
> > > 
>       </xs:sequence>
>     </xs:complexType>
> 
> > > 
>   </xs:element>
> </xs:schema>
> 
> > > 
> > > 
> 
> > > 
> > > _______________________________________________ teiid-users
> mailing list teiid-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/teiid-users
> > 
> 
> > 
> > _______________________________________________ teiid-users mailing
> list teiid-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/teiid-users
> 
> 
> _______________________________________________
> teiid-users mailing list
> teiid-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/teiid-users



More information about the teiid-users mailing list