codeant-ai-for-open-source[bot] commented on code in PR #45410:
URL: https://github.com/apache/superset/pull/45410#discussion_r4303476632


##########
superset/charts/client_processing.py:
##########
@@ -1237,6 +1250,20 @@ def label_of(name: str) -> str:
     # left untouched, matching the browser.
     for column in df.columns:
         config = config_by_label.get(column) or {}
+
+        # Mirror the Table plugin's first formatter branch
+        # (``if (isTime || config.d3TimeFormat)`` in ``transformProps.ts``):
+        # an explicit per-column ``d3TimeFormat`` formats a temporal column and
+        # takes precedence over number formatting. Scoped to datetime columns
+        # with an explicit format; the bare ``isTime`` fallback,
+        # ``tableTimestampFormat`` default, SMART_DATE granularity, and string
+        # temporal columns are intentionally left to a follow-up, since they
+        # need a full server-side d3-time-format port rather than ``strftime``.
+        time_format = config.get("d3TimeFormat")
+        if time_format and pd.api.types.is_datetime64_any_dtype(df[column]):
+            format_time_column(df, column, time_format)

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and 
marked this thread resolved** as of `983ccd9`.
   
   The datetime-format branch now skips `SMART_DATE` and only passes formats 
containing `%` to `format_time_column`, preventing `smart_date` from being sent 
to `strftime`.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it 
open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
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]

Reply via email to