query: distinct on non-existent field does not fail
Closed this issue · 2 comments
buchanae commented
q.where(aql.eq("_label", "Individual")).where(aql.eq("source", "tcga")).mark("individual").in_("sampleOf").where(aql.eq("disease_code", "BRCA")).mark("sample").distinct(["$.individualz.gid"]).limit(1).execute()[0].to_dict()
In the query above, the distinct field is accidentally wrong, but I still get results.
I guess this touches on the commonly recurring topic of schema vs no schema – how can you know the field doesn't exist without a schema? I'll say that, as a user, not having the server tell me I'm wrong makes it harder to learn the query language and easier to make mistakes.
adamstruck commented
yeah this bug should be fixed.