dosubot[bot] commented on issue #34718:
URL: https://github.com/apache/superset/issues/34718#issuecomment-3191636826
<!-- Answer -->
Restarting the Superset server won't fix this—it's a backend type
recognition bug in 5.0.0. The only reliable workaround is to patch the DuckDB
engine spec so Superset explicitly recognizes 'DOUBLE' as numeric and shows the
# icon. You can do this by adding a custom mapping in your `superset_config.py`:
```python
from superset.db_engine_specs.duckdb import DuckDBEngineSpec
import re
from sqlalchemy import types
from superset.utils.core import GenericDataType
DuckDBEngineSpec.column_type_mappings = [
(re.compile(r"^double$", re.IGNORECASE), types.Float(),
GenericDataType.NUMERIC),
] + getattr(DuckDBEngineSpec, "column_type_mappings", [])
```
Place this file in your Superset config directory, then restart Superset.
This patch ensures columns with type 'DOUBLE' are recognized as numeric and
usable for histograms [see code
reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py).
Alternatively, upgrading to a newer Superset version will resolve this, as
type recognition logic has been improved. Let me know if you need help with the
patch or upgrade process.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do?
[Good](https://app.dosu.dev/response-feedback/98230257-f946-4419-b376-f96f3306fc4b?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/98230257-f946-4419-b376-f96f3306fc4b?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/98230257-f946-4419-b376-f96f3306fc4b?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/98230257-f946-4419-b376-f96f3306fc4b?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/98230257-f946-4419-b376-f96f3306fc4b?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/98230257-f946-4419-b376-f96f3306fc4b?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/98230257-f946-4419-b376-f96f3306fc4b?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34718)
--
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]