You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "DLoc-poste (via GitHub)" <gi...@apache.org> on 2024/09/23 13:36:54 UTC

[I] NaN - date fields are not displayed correctly in superset [superset]

DLoc-poste opened a new issue, #30361:
URL: https://github.com/apache/superset/issues/30361

   ### Bug description
   
   Hello,
   From postgressql database version : 9.6.16 :  
   Some date fields are displayed correctly in SQL request but are not displayed correctly in superset
   
   I found the issue below but it is closed : 
   ![image](https://github.com/user-attachments/assets/e132d560-5363-4efb-be62-f80400226dc8)
   
   
   
   ### How to reproduce the bug
   
   - In postgresql database version : 9.6.16 , in a date field , insert a value before may before 1936 : 
   10/01/1901 
   - display it in a superset 4.0.2 dashboard. 
   
   ### Screenshots/recordings
   
   **From database request :** 
   ![From databse](https://github.com/user-attachments/assets/bb541047-48c6-45ae-a62f-7676814a1df5)
   
   **From superset dashboard :**
   ![from superset](https://github.com/user-attachments/assets/08876fd9-03bb-4aa3-b1d4-41949d17478a)
   
   **From superset some well displayed :** 
   ![from superset some ok](https://github.com/user-attachments/assets/8d3c5b3f-0c2f-42d3-a57f-f9fc2cdcae50)
   
   **database field definition :**
   ![2024-09-23_15h30_33](https://github.com/user-attachments/assets/3bc29f55-171b-40ae-b01a-33181503fc89)
   
   
   ### Superset version
   
   4.0.2
   
   ### Python version
   
   I don't know
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] NaN - date fields are not displayed correctly in superset [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30361:
URL: https://github.com/apache/superset/issues/30361#issuecomment-2369236816

   <img width="183" alt="image" src="https://github.com/user-attachments/assets/a2b09888-ecfc-4a1d-aa25-25cd8b8146cc">
   🎶BATMAAAAAAAN🎶


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] NaN - date fields are not displayed correctly in superset [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #30361:
URL: https://github.com/apache/superset/issues/30361#issuecomment-2368296713

   <!-- Greeting -->
   Hey @DLoc-poste! I'm Dosu, a bot here to help you with bug fixes and answer your questions. Let's work together to tackle this issue!
   
   <!-- Answer -->
   The issue you're encountering with date fields displaying as "NaN" in Apache Superset 4.0.2 dashboards is likely due to inconsistencies in how timestamps without explicit timezones are handled. Apache Superset relies on Pandas to read SQL into a DataFrame, and Pandas may ignore the DB-API type code, leading to issues with timestamp serialization. This can result in timestamps being incorrectly coerced, causing them to display as "NaN" in the client.
   
   To resolve this, ensure that both the PostgreSQL database and the Apache Superset backend are configured to use the same timezone, preferably UTC, to avoid incorrect coercion of temporal fields <sup>[[1]](https://github.com/apache/superset/blob/master/docs/docs/configuration/timezones.mdx)</sup>.
   
   Additionally, I found a similar closed issue related to "NaN" in legend dimensions, which might provide some context: [NaN in legend dimension](https://github.com/apache/superset/issues/16655) <sup>[[2]](https://github.com/apache/superset/issues/16655)</sup>.
   
   The pull request you mentioned ([#24696](https://github.com/apache/superset/pull/24696)) does not have specific details available in the repository, so it might not directly address your issue <sup>[[1]](https://github.com/apache/superset/blob/master/docs/docs/configuration/timezones.mdx)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] NaN - date fields are not displayed correctly in superset [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #30361:
URL: https://github.com/apache/superset/issues/30361#issuecomment-2368514650

   I'm using a newer version of Postgres (14 or 15) and can reproduce this in Superset 4.0.2.  In SQL Lab I run:
   ```
   select (GETDATE() - 40000 ) as dt1,
   (GETDATE() - 40000 ) as dt2
   ```
   Then save as a dataset.
   
   Result:
   ![image](https://github.com/user-attachments/assets/cf7a9821-6cd2-4a1f-a6fc-dd20e0440b52)
   
   Here is the original report for this bug: https://github.com/apache/superset/issues/24561 I think I failed to reproduce it in that thread because subtracting `31150` days from "now" was no longer far enough back to trigger this behavior.  Now at 40000 it should remain a valid bug report for another decade or so at least.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] NaN - date fields are not displayed correctly in superset [superset]

Posted by "dex-k (via GitHub)" <gi...@apache.org>.
dex-k commented on issue #30361:
URL: https://github.com/apache/superset/issues/30361#issuecomment-2412628436

   I've done some testing, and dates begin to display incorrectly from 1938-04-24, 22:13:21 UTC. This corresponds to a Unix timestamp of `-999999999`, clearly not a coincidence. While I don't have the time to dig deeper, hopefully this can be of use to someone else.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] NaN - date fields are not displayed correctly in superset [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #30361: NaN - date fields are not displayed correctly in superset 
URL: https://github.com/apache/superset/issues/30361


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] NaN - date fields are not displayed correctly in superset [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30361:
URL: https://github.com/apache/superset/issues/30361#issuecomment-2810920500

   Is anyone still facing this issue? If not, it's at risk of being closed as stale/not-planned, since it's been silent for > 6 months.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] NaN - date fields are not displayed correctly in superset [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30361:
URL: https://github.com/apache/superset/issues/30361#issuecomment-3141334133

   Closing as not-planned, but happy to revisit/reopen this if anyone is still facing it or wants to open a PR. 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org