EnxDev commented on code in PR #45209:
URL: https://github.com/apache/superset/pull/45209#discussion_r4255951049
##########
superset/utils/pandas_postprocessing/rank.py:
##########
@@ -32,7 +32,7 @@ def rank(
:param group_by: The column to group by.
:return: a flat DataFrame
"""
- if group_by:
+ if group_by is not None:
Review Comment:
Only side effect I can see: a saved query context or API client that sent
`group_by: ""` to mean "no grouping" used to get global ranks, and will get a
`KeyError: ''` from `groupby` instead.
The Heatmap plugin sends `undefined` in that case, so the UI path is fine.
Probably acceptable, just flagging it since `rank` has no column validation to
turn that into a readable error.
--
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]