luth2 commented on code in PR #45823:
URL: https://github.com/apache/superset/pull/45823#discussion_r4431467118


##########
superset/commands/dataset/importers/v1/utils.py:
##########
@@ -770,7 +770,7 @@ def _convert_temporal_columns(df: pd.DataFrame, dtype: 
dict[str, Any]) -> None:
     for column_name, sqla_type in dtype.items():
         if isinstance(sqla_type, (Date, DateTime)):
             try:
-                df[column_name] = pd.to_datetime(df[column_name])
+                df[column_name] = 
pd.to_datetime(df[column_name]).dt.as_unit("ns")

Review Comment:
   Validated as fixed on the current branch; audit commit e8e1b5cf85. Temporal 
imports only use the datetime accessor for datetime dtypes, and mixed-offset 
values are parsed individually without forced nanosecond casts. Both ordinary 
mixed offsets and a year-3118 value survive. The temporal import regressions 
passed on Python 3.11/pandas 3.0.6 and Python 3.15/pandas 3.1.0. Resolving this 
older thread.



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