john-bodley commented on code in PR #24942:
URL: https://github.com/apache/superset/pull/24942#discussion_r1290452448
##########
superset/connectors/sqla/models.py:
##########
@@ -1011,7 +1013,7 @@ def adhoc_column_to_sqla( # pylint:
disable=too-many-locals
if is_dttm and has_timegrain:
sqla_column = self.db_engine_spec.get_timestamp_expr(
col=sqla_column,
- pdf=None,
+ pdf=pdf,
Review Comment:
I'm concerned that this change may actually break existing logic—given it
was explicitly set to `None`. Would you mind adding a unit test for this which
helps not just to provide code coverage, but also helps reviewers et al. grok
the consequence of the change.
@zhaoyongjie it seems like you added this logic in
https://github.com/apache/superset/pull/21163 and thus you probably have the
most context as to why we historically weren't defining the `pdf` variable.
--
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]