Skip to content

Subqueries in where clause failing #223

Description

@severingaudet
select O.collection, O.observationID, O.maxLastModified         
from caom2.Observation as O left outer join caom2.Plane as P on O.obsID = P.obsID
where O.collection = 'POSSUM' and P.planeID is null

fails in Topcat with the following message:

Image
        select O.collection, O.observationID, P.planeID, P.dataProductType, P.maxLastModified
        from caom2.Observation as O join caom2.Plane as P on O.obsID = P.obsID
        where collection = '{collection}' and (quality_flag is null or quality_flag != 'junk')
        and exists (select NULL from caom2.Artifact as A where P.planeID = A.planeID and A.productType = 'science')
        and exists (select NULL from caom2.Artifact as A where P.planeID = A.planeID and A.productType = 'preview')
        and exists (select NULL from caom2.Artifact as A where P.planeID = A.planeID and A.productType = 'thumbnail')

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions