You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "johannes-ws (via GitHub)" <gi...@apache.org> on 2025/08/15 07:54:54 UTC
[D] How to casting float to double in Superset 5.0.0? [superset]
GitHub user johannes-ws created a discussion: How to casting float to double in Superset 5.0.0?
I want to create a histogram chart, but column field must be a numeric column. I have a dataset which contains float data type, but when i try to drag this column to column field, it's not accepted because my column type is categorized as number, not numeric. I already try to casting the data type with <code>CAST(column_name AS DOUBLE)</code>, but it's categorized again as number. So, i can't create a histogram chart. What should i do? @dosu
GitHub link: https://github.com/apache/superset/discussions/34717
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: How to casting float to double in Superset 5.0.0?
<!-- Answer -->
Superset’s histogram chart only accepts columns recognized as “numeric” (GenericDataType.Numeric) by its internal type mapping. Both float and double should be mapped as numeric, but if your column isn’t accepted, it’s likely because the database returns a type string that Superset doesn’t recognize as numeric, especially after casting or using expressions.
Try these steps:
1. In SQL Lab, cast your column to a standard numeric type like BIGINT or DECIMAL (e.g., `CAST(column_name AS BIGINT)` or `CAST(column_name AS DECIMAL)`), then check if Superset recognizes it as numeric in the dataset editor or chart controls. Casting to BIGINT is a known workaround for type recognition and rendering issues in Superset charts, including histograms [[source]](https://github.com/apache/superset/issues/33556#issuecomment-2900100640).
2. Make sure your data has no nulls in the column you want to use, as Superset 5.0.0 enforces strict null handling for histograms—nulls must be filtered or filled before charting [[source]](https://github.com/apache/superset/issues/33738#issuecomment-2961105288).
3. If the column still isn’t recognized, check the column’s type in SQL Lab’s results. If it’s not a standard numeric type, try a different cast or adjust your SQL expression.
If you let me know which database backend you’re using (e.g., PostgreSQL, MySQL), I can give more specific guidance.
<!-- 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/ff0bd1cf-185a-4935-8f4a-d4c813e58e5e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ff0bd1cf-185a-4935-8f4a-d4c813e58e5e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ff0bd1cf-185a-4935-8f4a-d4c813e58e5e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ff0bd1cf-185a-4935-8f4a-d4c813e58e5e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ff0bd1cf-185a-4935-8f4a-d4c813e58e5e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ff0bd1cf-185a-4935-8f4a-d4c813e58e5e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ff0bd1cf-185a-4935-8f4a-d4c813e58e5e?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](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/discussions/34717)
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14114098
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: How to casting float to double in Superset 5.0.0?
<!-- Answer -->
Superset only recognizes DuckDB columns as "numeric" for histograms if the column's type string starts with `float`, `double`, `decimal`, or `numeric`—this is determined by strict regex matching in Superset's backend. If DuckDB returns a type string like `DOUBLE PRECISION` or `DECIMAL(18,4)`, Superset won't recognize it as numeric, even after casting, so the column stays unusable for histograms [[source]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py).
To troubleshoot: in SQL Lab, run `SELECT typeof(column_name) FROM table LIMIT 1` to see the exact type string DuckDB emits after casting. If it doesn't start with one of the recognized patterns, Superset won't accept it. You can try casting to a type that matches the pattern (e.g., `CAST(column_name AS DOUBLE) AS double_col`), but if DuckDB still returns a nonstandard type string, the only reliable fix is to patch Superset's DuckDB engine spec to add a regex for the actual DuckDB type string.
Also, make sure to filter out nulls from your column before creating the histogram chart—Superset 5.0.0 enforces strict null handling for histograms [[source]](https://github.com/apache/superset/issues/33738#issuecomment-2961105288).
Let me know the result of the `typeof` query if you want more targeted advice!
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=723d4449-7ab6-4463-b59f-d24df0c34b51) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14114540
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: How to casting float to double in Superset 5.0.0?
<!-- Answer -->
Superset only lets you use columns for histogram charts if they’re classified as “numeric” (GenericDataType.NUMERIC) by its backend. This classification depends on the exact type string DuckDB returns for your column. Superset uses regex patterns to match type strings that start with float, double, decimal, or numeric—if your column’s type string doesn’t match exactly (for example, if DuckDB returns something like DOUBLE PRECISION or a nonstandard label), Superset won’t recognize it as numeric, and the column will show up as “number” (non-numeric) in the chart menu, making it unavailable for the histogram field. This is all determined by backend logic and not something you can change from the UI or by casting in SQL Lab alone.
To work around this, you’d need to either ensure DuckDB emits a standard type string (like DOUBLE or FLOAT) or patch Superset’s DuckDB engine spec to recognize the actual type string DuckDB produces for your column. There’s no separate “number” type in Superset’s backend—if a column isn’t recognized as numeric, it’s just not eligible for numeric-only chart fields like histograms.
[Reference: Superset type mapping logic](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py)
<!-- 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/6389648e-54ce-42a6-93c3-5fc6a2ea88bc?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6389648e-54ce-42a6-93c3-5fc6a2ea88bc?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6389648e-54ce-42a6-93c3-5fc6a2ea88bc?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6389648e-54ce-42a6-93c3-5fc6a2ea88bc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6389648e-54ce-42a6-93c3-5fc6a2ea88bc?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/6389648e-54ce-42a6-93c3-5fc6a2ea88bc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6389648e-54ce-42a6-93c3-5fc6a2ea88bc?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](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/discussions/34717)
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14115291
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: How to casting float to double in Superset 5.0.0?
<!-- Answer -->
Superset displays your DuckDB DOUBLE column as FLOAT in SQL Lab because both DOUBLE and FLOAT are mapped to the same internal SQLAlchemy type (`types.Float()`) by Superset’s type inference logic. This mapping is intentional and comes from regex patterns in the engine spec that treat any type string starting with "double" or "float" as a generic numeric type, but display it as FLOAT in the UI regardless of the original database type string. This does not affect the column’s usability as a numeric type for charts, as long as the type string matches the expected pattern for numeric recognition.
[Source: Superset base engine spec code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py)
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=98a69fcc-f9e8-49ec-8b42-62932f886cea) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14114743
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: How to casting float to double in Superset 5.0.0?
<!-- Answer -->
Superset’s histogram chart only accepts columns recognized as “numeric” (GenericDataType.Numeric) by its internal type mapping. Both float and double should be mapped as numeric, but if your column isn’t accepted, it’s likely because the database returns a type string that Superset doesn’t recognize as numeric, especially after casting or using expressions.
Try these steps:
1. In SQL Lab, cast your column to a standard numeric type like BIGINT or DECIMAL (e.g., `CAST(column_name AS BIGINT)` or `CAST(column_name AS DECIMAL)`), then check if Superset recognizes it as numeric in the dataset editor or chart controls. Casting to BIGINT is a known workaround for type recognition and rendering issues in Superset charts, including histograms [[source]](https://github.com/apache/superset/issues/33556#issuecomment-2900100640).
2. Make sure your data has no nulls in the column you want to use, as Superset 5.0.0 enforces strict null handling for histograms—nulls must be filtered or filled before charting [[source]](https://github.com/apache/superset/issues/33738#issuecomment-2961105288).
3. If the column still isn’t recognized, check the column’s type in SQL Lab’s results. If it’s not a standard numeric type, try a different cast or adjust your SQL expression.
If you let me know which database backend you’re using (e.g., PostgreSQL, MySQL), I can give more specific guidance.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=ff0bd1cf-185a-4935-8f4a-d4c813e58e5e) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14114098
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: How to casting float to double in Superset 5.0.0?
<!-- Answer -->
Superset only recognizes DuckDB columns as "numeric" for histograms if the column's type string starts with `float`, `double`, `decimal`, or `numeric`—this is determined by strict regex matching in Superset's backend. If DuckDB returns a type string like `DOUBLE PRECISION` or `DECIMAL(18,4)`, Superset won't recognize it as numeric, even after casting, so the column stays unusable for histograms [[source]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py).
To troubleshoot: in SQL Lab, run `SELECT typeof(column_name) FROM table LIMIT 1` to see the exact type string DuckDB emits after casting. If it doesn't start with one of the recognized patterns, Superset won't accept it. You can try casting to a type that matches the pattern (e.g., `CAST(column_name AS DOUBLE) AS double_col`), but if DuckDB still returns a nonstandard type string, the only reliable fix is to patch Superset's DuckDB engine spec to add a regex for the actual DuckDB type string.
Also, make sure to filter out nulls from your column before creating the histogram chart—Superset 5.0.0 enforces strict null handling for histograms [[source]](https://github.com/apache/superset/issues/33738#issuecomment-2961105288).
Let me know the result of the `typeof` query if you want more targeted advice!
<!-- 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/723d4449-7ab6-4463-b59f-d24df0c34b51?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/723d4449-7ab6-4463-b59f-d24df0c34b51?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/723d4449-7ab6-4463-b59f-d24df0c34b51?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/723d4449-7ab6-4463-b59f-d24df0c34b51?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/723d4449-7ab6-4463-b59f-d24df0c34b51?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/723d4449-7ab6-4463-b59f-d24df0c34b51?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/723d4449-7ab6-4463-b59f-d24df0c34b51?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](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/discussions/34717)
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14114540
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: How to casting float to double in Superset 5.0.0?
<!-- Answer -->
Superset only lets you use columns for histogram charts if they’re classified as “numeric” (GenericDataType.NUMERIC) by its backend. This classification depends on the exact type string DuckDB returns for your column. Superset uses regex patterns to match type strings that start with float, double, decimal, or numeric—if your column’s type string doesn’t match exactly (for example, if DuckDB returns something like DOUBLE PRECISION or a nonstandard label), Superset won’t recognize it as numeric, and the column will show up as “number” (non-numeric) in the chart menu, making it unavailable for the histogram field. This is all determined by backend logic and not something you can change from the UI or by casting in SQL Lab alone.
To work around this, you’d need to either ensure DuckDB emits a standard type string (like DOUBLE or FLOAT) or patch Superset’s DuckDB engine spec to recognize the actual type string DuckDB produces for your column. There’s no separate “number” type in Superset’s backend—if a column isn’t recognized as numeric, it’s just not eligible for numeric-only chart fields like histograms.
[Reference: Superset type mapping logic](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py)
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=6389648e-54ce-42a6-93c3-5fc6a2ea88bc) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14115291
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "johannes-ws (via GitHub)" <gi...@apache.org>.
GitHub user johannes-ws added a comment to the discussion: How to casting float to double in Superset 5.0.0?
The result of the <code>typeof</code> is DOUBLE, but why Superset recognizes it as FLOAT in SQL Lab preview table? @dosu
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14114729
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "johannes-ws (via GitHub)" <gi...@apache.org>.
GitHub user johannes-ws deleted a comment on the discussion: How to casting float to double in Superset 5.0.0?
Superset already recognizes my column as FLOAT, we can see this from SQL Lab preview tables. I hope it's clear enough and you're understand. The main question is why my FLOAT column recognized as <code>?</code> icon, not <code>#</code> icon? @dosu
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14116478
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "johannes-ws (via GitHub)" <gi...@apache.org>.
GitHub user johannes-ws added a comment to the discussion: How to casting float to double in Superset 5.0.0?
My column's type is float in SQL Lab’s results. When i try to casting it into double or decimal in SQL Lab and saved it into dataset, there is no changes with my column's type (still categorized as number). I'm using DuckDB database backend. What should i do? @dosu
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14114496
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: How to casting float to double in Superset 5.0.0?
<!-- Answer -->
Superset displays your DuckDB DOUBLE column as FLOAT in SQL Lab because both DOUBLE and FLOAT are mapped to the same internal SQLAlchemy type (`types.Float()`) by Superset’s type inference logic. This mapping is intentional and comes from regex patterns in the engine spec that treat any type string starting with "double" or "float" as a generic numeric type, but display it as FLOAT in the UI regardless of the original database type string. This does not affect the column’s usability as a numeric type for charts, as long as the type string matches the expected pattern for numeric recognition.
[Source: Superset base engine spec code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py)
<!-- 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/98a69fcc-f9e8-49ec-8b42-62932f886cea?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/98a69fcc-f9e8-49ec-8b42-62932f886cea?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/98a69fcc-f9e8-49ec-8b42-62932f886cea?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/98a69fcc-f9e8-49ec-8b42-62932f886cea?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/98a69fcc-f9e8-49ec-8b42-62932f886cea?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/98a69fcc-f9e8-49ec-8b42-62932f886cea?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/98a69fcc-f9e8-49ec-8b42-62932f886cea?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](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/discussions/34717)
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14114743
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "johannes-ws (via GitHub)" <gi...@apache.org>.
GitHub user johannes-ws added a comment to the discussion: How to casting float to double in Superset 5.0.0?
Okay, it's fine for me, but why is my column can't be added to column field in histogram chart menu however my column type is float? Why is in histogram chart menu my column recognizes as number, not numeric which column field accepts it? @dosu
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14115270
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to casting float to double in Superset 5.0.0? [superset]
Posted by "johannes-ws (via GitHub)" <gi...@apache.org>.
GitHub user johannes-ws added a comment to the discussion: How to casting float to double in Superset 5.0.0?
Superset already recognizes my column as FLOAT, we can see this from SQL Lab preview tables. I hope it's clear enough and you're understand. The main question is why my FLOAT column recognized as <code>?</code> icon, not <code>#</code> icon? @dosu
GitHub link: https://github.com/apache/superset/discussions/34717#discussioncomment-14116478
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org