Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0NaN-NaN-NaN NaN:NaN:NaN in Tables when Include Time is enabled #10203

Closed
2 of 3 tasks
bearloga opened this issue Jun 30, 2020 · 16 comments
Closed
2 of 3 tasks

0NaN-NaN-NaN NaN:NaN:NaN in Tables when Include Time is enabled #10203

bearloga opened this issue Jun 30, 2020 · 16 comments
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@bearloga
Copy link

When checking the "Include Time" option in the GROUP BY section of a chart and using the Table visualization, the output doesn't print the actual datetimes.

Expected results

Datetimes based on time range & granularity selected

Actual results

"0NaN-NaN-NaN NaN:NaN:NaN"

Screenshots

Attaching screenshots from both datasource types (Druid Table, classic cube):

Screen Shot 2020-06-30 at 11 34 03 AM

Screen Shot 2020-06-30 at 11 37 28 AM

How to reproduce the bug

  1. Create a new Table chart
  2. Adjust time granularity, range, etc.
  3. In the GROUP BY section, check "Include Time" option
  4. Run query

Environment

  • superset version: 0.36.0

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
    • Don't have access to the host but hopefully @elukey can provide
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@bearloga bearloga added the !deprecated-label:bug Deprecated label - Use #bug instead label Jun 30, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.94. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@durchgedreht
Copy link

Hi,
we encounter the same issue, but with the pattern "NaN/NaN/0NaN".

  • superset version: 0.36.0
  • clickhouse
  • native clickhouse alchemy driver

Time_formatting

When looking in the query log, ordering per week applies a toMonday() function after a toDatetime(). Result will not be DateTime but Date (have a look in the. "__timestamp" field - no time infos available). I'm not sure where the issue resides, but the rending in HTML shows a zeroed out Datetime with format "yyyy-MM-dd 00:00:00" (first picture at the bottom shows the chrome dev inspect window with data-sort="2020-02-24T00:00:00" ) .
Superset_toMonday

So I believe it's just the rendering that's impacted. Many NaN Date rendering is related to wrong Date input, so maybe columns are mixed up, wrong format pattern applied, index wrong (month values 0-11 vs 1-12).

I can provide more infos if needed. Please advise which data might be helpful.

@durchgedreht
Copy link

Additional infos: Chart's CSV export also uses the date from query. No issues exporting the data.

...,2020-04-27, ...

@durchgedreht
Copy link

Seems related to
#10097
and is fixed in 0.37 (not yet testet - will try to verify)
#9493

@mistercrunch
Copy link
Member

0NaN-NaN-NaN NaN:NaN:NaN - hey hey hey - goodbye!

@allantaylor81
Copy link

the same problem ! Did it work out in the end ? Look forward to your reply ! thanks

@whitefirer
Copy link

0.37 has sloved it.

@durchgedreht
Copy link

+1
Works from >= 0.37

@bearloga
Copy link
Author

Screenshot of Superset 0.37.2 showing fixed timestamps when including time in GROUP BY via checkbox and visualizing with table chart

We just upgraded to 0.37.2 and I can confirm this problem is gone. Thank you!

@stevensuting
Copy link

stevensuting commented Jan 18, 2021

This still happens in 0.38.0 for columns that are placed in the group by list. This issue describes the same

This is from my instance:
Screenshot 2021-01-18 at 3 30 48 PM

@villebro
Copy link
Member

@stevensuting can you add the following information:

  • the database type
  • the datatype of the "Last Appointment Date" and "Last Feedback Date" columns?

Also, the cell values that are displaying NaN..., are those NULL values?

@stevensuting
Copy link

stevensuting commented Jan 18, 2021

@villebro

  • Database Type: Postgres
  • Data type of columns Last Appointment Date" and "Last Feedback Date: timestamptz
  • Cell value in DB for which Superset is displaying NaN: NULL
  • Data type set in Superset implicitly: TIMESTAMP WITH TIME ZONE

@bonedi
Copy link

bonedi commented Dec 12, 2023

I still have this Issue in version 2.1.2.
I have tried to cast the value to varchar, still I get 0nan-nan... in the chart.

@MilenaSilva10
Copy link

I also have this problem, how can I solve it?

@villebro
Copy link
Member

villebro commented Mar 2, 2024

@MilenaSilva10 which version are you on, and which database type? This should not be happening on recent versions of Superset.

@MilenaSilva10
Copy link

@villebro it is showing version 0.0.0-dev. I saw it happened in August 2023 too, but I think the problem came back
#24696

versao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

No branches or pull requests

9 participants