Incubator-superset: 0NaN-NaN-NaN NaN:NaN:NaN in Tables when Include Time is enabled

Created on 30 Jun 2020  Â·  9Comments  Â·  Source: apache/incubator-superset

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

  • [x] I have reproduced the issue with at least the latest released version of superset.
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar.
#bug

Most helpful comment

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

All 9 comments

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

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

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.

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

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

Seems related to

10097

and is fixed in 0.37 (not yet testet - will try to verify)

9493

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

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

0.37 has sloved it.

+1
Works from >= 0.37

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tmccartan picture tmccartan  Â·  3Comments

sashank picture sashank  Â·  3Comments

gbrian picture gbrian  Â·  3Comments

lenguyenthedat picture lenguyenthedat  Â·  3Comments

john-bodley picture john-bodley  Â·  3Comments