aminghadersohi commented on code in PR #45104:
URL: https://github.com/apache/superset/pull/45104#discussion_r4226120693
##########
superset/semantic_layers/mapper.py:
##########
@@ -1278,7 +1314,7 @@ def _validate_orderby(query_object: ValidatedQueryObject)
-> None:
)
elements = {orderby[0] for orderby in query_object.orderby}
Review Comment:
Pre-existing on master, not introduced here: with
`ADHOC_EXPRESSIONS_IN_ORDERBY` advertised, a dict orderby element raises
`TypeError: unhashable type: 'dict'` here, although mapping supports it.
Skipping non-str elements fixes it and still rejects unknown names.
```suggestion
elements = {
element for element, _ in query_object.orderby if
isinstance(element, str)
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]