Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iRODS 4.2.7 generates invalid SQL for IN clause in metadata queries #233

Open
kjsanger opened this issue Nov 25, 2020 · 0 comments
Open

Comments

@kjsanger
Copy link
Member

Since iRODS 4.2.7, use of an IN clause in combination with one or more = clauses (via iRODS' genQuery API) causes iRODS to generate invalid SQL on the backend:

jq -n '{avus: [{attribute: "target", value: "1"},  {attribute: "sample", value: ["ukbb_scrna8122724","ukbb_scrna9323398"], o: "in"}]}' | baton-metaquery --zone seq --obj --avu --verbose
2020-11-25T15:10:06Z ERROR Failed to fetch query result: in chunk 0 error -806000 CAT_SQL_ERR
2020-11-25T15:10:06Z ERROR Failed to fetch query result: in chunk 0 error -806000 CAT_SQL_ERR
{"avus": [{"attribute": "target", "value": "1"}, {"attribute": "sample", "value": ["ukbb_scrna8122724", "ukbb_scrna9323398"], "o": "in"}], "error": {"message": "Failed to fetch query result: in chunk 0 error -806000 CAT_SQL_ERR", "code": -806000}}
2020-11-25T15:10:06Z WARN Processed 1 items with 1 errors

In this example the IN clause on its own was successful.

@kjsanger kjsanger changed the title iRODS 4.2.7 generates invalid SQL for IN clause in metadat queries iRODS 4.2.7 generates invalid SQL for IN clause in metadata queries Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant