oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris A. Mattmann (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OODT-546) XMLPS inner-joins default table with itself
Date Thu, 20 Dec 2012 02:39:13 GMT

     [ https://issues.apache.org/jira/browse/OODT-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris A. Mattmann updated OODT-546:
-----------------------------------

    Description: 
When the default table is set to an existing table name, XMLPS tries to inner join the default
table with itself, resulting in a failed query. 

Example

With the following ps.xml file
{code:xml}
<oodt:xmlps xmlns:oodt="http://incubator.apache.org/oodt/0.1-incubating"
	name="CERC Query Handler" id="EDRN.CERC.CancerData">
	<!--<tables default="Table1">-->
  <tables default="Cancer_Data">
    <table name="Cancer_Data" join="STUDY_PARTICIPANT_ID_SITE_TEXT" tofld="STUDY_PARTICIPANT_ID_SITE_TEXT"/>
  </tables>

  <field type="dynamic" name="STUDY_PARTICIPANT_ID" dbname="STUDY_PARTICIPANT_ID_SITE_TEXT"
/>
    
  <field type="constant" name="BASELINE_CANCER-CONFIRMATION_CODE" value="1"/>
</oodt:xmlps>
{code}

A query to 

{noformat}
http://localhost:8080/web-grid/prod?q=RETURN%3DSTUDY_PARTICIPANT_ID
{noformat}

Results in the following:
{noformat}
WARNING: Error executing sql: [SELECT Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT as STUDY_PARTICIPANT_ID
FROM Cancer_Data INNER JOIN Cancer_Data ON Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT = Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT
]: Message: Not unique table/alias: 'Cancer_Data'
{noformat}

If the default table is changed to "Participant_Data" then the query functions fine.

  was:
When the default table is set to an existing table name, XMLPS tries to inner join the default
table with itself, resulting in a failed query. 

Example

With the following ps.xml file
<oodt:xmlps xmlns:oodt="http://incubator.apache.org/oodt/0.1-incubating"
	name="CERC Query Handler" id="EDRN.CERC.CancerData">
	<!--<tables default="Table1">-->
  <tables default="Cancer_Data">
    <table name="Cancer_Data" join="STUDY_PARTICIPANT_ID_SITE_TEXT" tofld="STUDY_PARTICIPANT_ID_SITE_TEXT"/>
  </tables>

  <field type="dynamic" name="STUDY_PARTICIPANT_ID" dbname="STUDY_PARTICIPANT_ID_SITE_TEXT"
/>
    
  <field type="constant" name="BASELINE_CANCER-CONFIRMATION_CODE" value="1"/>
</oodt:xmlps>

A query to 
http://localhost:8080/web-grid/prod?q=RETURN%3DSTUDY_PARTICIPANT_ID

Results in the following:
WARNING: Error executing sql: [SELECT Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT as STUDY_PARTICIPANT_ID
FROM Cancer_Data INNER JOIN Cancer_Data ON Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT = Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT
]: Message: Not unique table/alias: 'Cancer_Data'

If the default table is changed to "Participant_Data" then the query functions fine.

    
> XMLPS inner-joins default table with itself
> -------------------------------------------
>
>                 Key: OODT-546
>                 URL: https://issues.apache.org/jira/browse/OODT-546
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.5
>            Reporter: Michael Joyce
>             Fix For: 0.6
>
>         Attachments: dump.sql, ps.xml
>
>
> When the default table is set to an existing table name, XMLPS tries to inner join the
default table with itself, resulting in a failed query. 
> Example
> With the following ps.xml file
> {code:xml}
> <oodt:xmlps xmlns:oodt="http://incubator.apache.org/oodt/0.1-incubating"
> 	name="CERC Query Handler" id="EDRN.CERC.CancerData">
> 	<!--<tables default="Table1">-->
>   <tables default="Cancer_Data">
>     <table name="Cancer_Data" join="STUDY_PARTICIPANT_ID_SITE_TEXT" tofld="STUDY_PARTICIPANT_ID_SITE_TEXT"/>
>   </tables>
>   <field type="dynamic" name="STUDY_PARTICIPANT_ID" dbname="STUDY_PARTICIPANT_ID_SITE_TEXT"
/>
>     
>   <field type="constant" name="BASELINE_CANCER-CONFIRMATION_CODE" value="1"/>
> </oodt:xmlps>
> {code}
> A query to 
> {noformat}
> http://localhost:8080/web-grid/prod?q=RETURN%3DSTUDY_PARTICIPANT_ID
> {noformat}
> Results in the following:
> {noformat}
> WARNING: Error executing sql: [SELECT Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT as STUDY_PARTICIPANT_ID
FROM Cancer_Data INNER JOIN Cancer_Data ON Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT = Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT
]: Message: Not unique table/alias: 'Cancer_Data'
> {noformat}
> If the default table is changed to "Participant_Data" then the query functions fine.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message