File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
python/lsst/daf/butler/queries Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,12 @@ def validate_tree(self, tree: QueryTree) -> None:
86
86
for term in spec .order_by :
87
87
term .gather_required_columns (order_by_columns )
88
88
if not (order_by_columns .dimensions <= spec .dimensions ):
89
+ allowed_columns = spec .dimensions .names
90
+ invalid_columns = order_by_columns .dimensions .names - allowed_columns
89
91
raise InvalidQueryError (
90
- "Order-by expression may not reference columns that are not in the result dimensions."
92
+ "Order-by expression may not reference columns that are not in the result dimensions.\n "
93
+ f"Invalid columns: { invalid_columns } \n "
94
+ f"Available columns: { allowed_columns } "
91
95
)
92
96
for dataset_type in order_by_columns .dataset_fields .keys ():
93
97
if dataset_type not in tree .datasets :
You can’t perform that action at this time.
0 commit comments