Print

Print


Please let's open a ticket "need to handle FROM ... JOIN ... USING ( 
...) ". I am not saying we have to support it asap, but we should
at minimum return an error

Jacek



On 10/01/2013 01:51 PM, Daniel L. Wang wrote:
> Hi Fabrice,
>
> Thanks for posting the query!
>
>
> mysql> SELECT s.ra, s.decl, o.raRange, o.declRange FROM   Object o
> JOIN   Source s USING (objectId) WHERE  o.objectId = 390034570102582
> AND    o.latestObsTime = s.taiMidPoint;
>
> I note that there is no code for supporting the FROM ... JOIN ... USING ( ...) syntax. I started playing with it last month, but don't have anything I can merge--it's just not on the road map, even though I think that you all want it (there seem to be other things more pressing).
>
> I think
>
> SELECT s.ra, s.decl, o.raRange, o.declRange
> FROM   Object o, Source s, where o.objectId =
> WHERE  o.objectId = 390034570102582
> AND o.objectId = s.objectId
> AND    o.latestObsTime = s.taiMidPoint;
>
> should work, though I haven't tested it.
>
> If you'd like to have a look at the code I was playing with, it's on branch
> u/danielw/joinSyntax1
> but it's now behind the shared scan code (which I hope to clean up to
> Serge's quality and merge soon) by a fair bit.
>
> -Daniel
>
>
> On 09/30/2013 08:38 AM, Fabrice Jammes wrote:
>> Hello Daniel,
>>
>> As told on Thursday, i've met several error on SQL queries wich works on
>> previous version (without qms and new parser).
>> I'm not sure if error come from the test procedure or from qserv new
>> version.
>> I propose to send it to you one by one with detailed log, instead of
>> sending the whole list (bugs may be fixed once and solve many queries).
>>
>> Here's one example for test case 01 :
>>
>> While connected to qserv :
>>
>> mysql> SELECT s.ra, s.decl, o.raRange, o.declRange FROM   Object o
>> JOIN   Source s USING (objectId) WHERE  o.objectId = 390034570102582
>> AND    o.latestObsTime = s.taiMidPoint;
>> ERROR 4120 (Proxy): Error during execution: 'open failed for chunk(s):
>> 6801 6630 6800 7138 7308 6970 6971 6968 6631 7140read failed for
>> chunk(s): 7478 7648 7310'
>>
>> xrootd and qserv-master logs are attached and it seems the errors are
>> reported in xrootd.log with SQL sentence like this one :
>>
>>    >>Unknown column 's.ra' in 'field list' Unable to execute query: CREATE
>> TABLE r_1e01fa2d9ea14d542987c2af43bb3645f_7478_0 SELECT
>> s.ra,s.decl,o.raRange,o.declRange FROM LSST.Object_7478 AS o WHERE
>> o.objectId=390034570102582 AND o.latestObsTime=s.taiMidPoint;
>> <<---Error with piece 0 complete (size=1).
>>
>> Indeed it seems table Source should be in FROM clause, aliased with 's' ?
>>
>> I can of course give you more information if needed.
>>
>> Thanks,
>>
>> Fabrice
>
> ########################################################################
> Use REPLY-ALL to reply to list
>
> To unsubscribe from the QSERV-L list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1
>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1