You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/08/05 12:11:33 UTC

[GitHub] [superset] renjithpaul27 opened a new issue #16087: Date default to 1970-01-01 in case of null values

renjithpaul27 opened a new issue #16087:
URL: https://github.com/apache/superset/issues/16087


   It looks like supeset defaults null valued date/timestamp values to 1970-01-01 instead of null values in table charts.
   
   ### Expected results
   
   Expected to see null or NA for null valued date,datetime,timestamp values.
   
   ### Actual results
   
   It defaults to 1970-01-01 for null valued rows.
   
   
   #### How to reproduce the bug
   
   Use a mysql backend and create a table with some valid/null values for a date field. Derive it as a table chart in superset.
   


-- 
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


[GitHub] [superset] ronaldvanrij commented on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
ronaldvanrij commented on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-946537830


   I can confirm this also occurs while using Postgres as database. It appears the NULL value is transformed into a not a time (NaT) value, which is output as "1970-01-01 00:00:00". 
   
   My (hopefully temporary) workaround is to add a calculated column to the dataset which converts the date into a string, which will display as N/A when the underlaying value is NULL. 


-- 
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


[GitHub] [superset] junlincc commented on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-951332764


   Thank you @ronaldvanrij Hopefully we can get to it in late Q4 


-- 
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


[GitHub] [superset] henry145145 commented on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
henry145145 commented on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-989997561


   I ran into this issue also in version 1.3.0
   
   the re-format for value null to value 1970-01-01 is happening in @superset-ui/plugin-chart-table:
   
   https://github.com/apache-superset/superset-ui/blob/881e25c7ee72f9b4f28db7e76ee977b9a5e8f2e5/plugins/plugin-chart-table/src/transformProps.ts#L53-L78
   
   and the formatters are from '@superset-ui/core', and it looks like the formatters are using d3 format.
   
   My workaround is clone/fork the table chart plugin and name it table_v2 and modify the code above so it won't format anything if the value is null. Then, use it as a custom plugin (put it under `visualization` directory).


-- 
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


[GitHub] [superset] ValentinC-BR commented on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
ValentinC-BR commented on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-922666167


   The same goes for me, all my NULL values in DATE fields are replaced by 1970-01-01 00:00:00 ...
   
   **Environment**
   superset version: 1.3.0
   python version: 3.7.9
   node.js version: doesn't apply, I run on Kubernetes, using gunicorn as server
   source : Athena


-- 
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


[GitHub] [superset] hieulw edited a comment on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
hieulw edited a comment on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-903383809


   I face the same problem when all my expected null date values is somehow converted to `1970-01-01 00:00:00` in datasource, while difference type like `TEXT`, `VARCHAR`, `INTEGER` is keep `N/A`
   
   ![image](https://user-images.githubusercontent.com/13571960/130379430-b61b55b1-3ac4-46ba-be5f-1cdf5742923e.png)
   


-- 
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


[GitHub] [superset] ChunshengZhao commented on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
ChunshengZhao commented on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-1083202023


   Also in version 1.4.2, DB is MSSQL.


-- 
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


[GitHub] [superset] hieulw edited a comment on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
hieulw edited a comment on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-903383809


   I face the same problem when all my expected null date values is somehow converted to `1970-01-01 00:00:00` in datasource, while difference type like `TEXT`, `VARCHAR`, `INTEGER` is keep `N/A`
   
   ![image](https://user-images.githubusercontent.com/13571960/130379430-b61b55b1-3ac4-46ba-be5f-1cdf5742923e.png)
   
   Edit: SQL Lab keep `N/A` for null date but not in explore view


-- 
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


[GitHub] [superset] junlincc commented on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-893699584


   Thanks for filing the issue, could you use the bug report template? additional information is needed before troubleshooting. @renjithpaul27 


-- 
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


[GitHub] [superset] hieulw commented on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
hieulw commented on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-903383809


   I face the same problem when all my expected null date values is somehow converted to `1970-01-01 00:00:00` in datasource, while difference type like `TEXT`, `VARCHAR` is keep `N/A`
   ![image](https://user-images.githubusercontent.com/13571960/130379430-b61b55b1-3ac4-46ba-be5f-1cdf5742923e.png)
   


-- 
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


[GitHub] [superset] vpicavet commented on issue #16087: Date default to 1970-01-01 in case of null values

Posted by GitBox <gi...@apache.org>.
vpicavet commented on issue #16087:
URL: https://github.com/apache/superset/issues/16087#issuecomment-1086298978


   I can reproduce on Superset 1.4.1 and PostgreSQL.


-- 
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