Ticket #2758 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

repeating column name confuses qserv

Reported by: jbecla Owned by: jbecla
Priority: critical Milestone:
Component: qserv Keywords:
Cc: jbecla, danielw Blocked By:
Blocking: Project: LSST
Version Number:
How to repeat:
SELECT filterName, filterName FROM Science_Ccd_Exposure

or

// run this on W13_1K database
SELECT sro.ra, s.ra
FROM   DeepSource AS s,
       DeepCoadd AS sce,
       RefDeepSrcMatch AS rom,
       RefObject AS sro
WHERE  (s.deepCoaddId = sce.deepCoaddId)
   AND (s.deepSourceId = rom.deepSourceId)
   AND (rom.refObjectId = sro.refObjectId)
   AND (sce.filterName = 'r')
   AND (sce.tract = 0) AND (sce.patch = '159,3');

Description (last modified by jbecla) (diff)

Selecting the same column more than once confuses qserv. Note that while selecting the same column twice from the same table is a little silly, selecting the same column from two different tables is perfectly reasonable.

Change History

comment:1 Changed 7 years ago by jbecla

  • Priority changed from minor to critical
  • How to repeat modified (diff)
  • Description modified (diff)

comment:2 Changed 6 years ago by jbecla

  • Status changed from new to closed
  • Resolution set to fixed

A simple workaround is to alias the column names:

SELECT sro.ra AS sroRa, s.ra AS sRa
FROM   DeepSource AS s,
       DeepCoadd AS sce,
       RefDeepSrcMatch AS rom,
       RefObject AS sro
WHERE  (s.deepCoaddId = sce.deepCoaddId)
   AND (s.deepSourceId = rom.deepSourceId)
   AND (rom.refObjectId = sro.refObjectId)
   AND (sce.filterName = 'r')
   AND (sce.tract = 0) AND (sce.patch = '159,3');

This will be handled correctly in the new parser. Closing the ticket.

Note: See TracTickets for help on using tickets.