Cloud-Architect-Emma commented on PR #40190:
URL: https://github.com/apache/superset/pull/40190#issuecomment-4507321915
Hi @hainenber, I've updated the fix based on your feedback. The
implementation now only converts a column when ALL non-null values successfully
convert to numeric, making it safe for mixed-type columns from any backend:
```python
converted = pd.to_numeric(df[col], errors="coerce")
if converted.notna().eq(df[col].notna()).all():
df[col] = converted
```
This is safer than the original `infer_objects()` and scoped by behavior
rather than by database backend, it only affects columns where the backend
returned genuinely numeric values as strings (like ClickHouse SUM()). Could you
re-review? Thank you!
--
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]