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 2022/04/11 07:08:05 UTC

[GitHub] [superset] zhaoyongjie commented on a diff in pull request #19605: fix: Query execution time is displayed as invalid date

zhaoyongjie commented on code in PR #19605:
URL: https://github.com/apache/superset/pull/19605#discussion_r847007434


##########
superset-frontend/src/views/CRUD/data/query/QueryList.tsx:
##########
@@ -181,12 +181,9 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
         accessor: QueryObjectColumns.start_time,
         Header: t('Time'),
         size: 'xl',
-        Cell: ({
-          row: {
-            original: { start_time, end_time },
-          },
-        }: any) => {
-          const startMoment = moment.utc(start_time).local();
+        Cell: ({ row: { original } }: any) => {
+          const startTime = parseFloat(original.start_time);

Review Comment:
   Why do we parse the string to a float, instead of web server response a float value directly? This issue seems that we should change the `start_time` and `end_time` from the server side to the float.
   
   Those columns in `Query` was numberic. We should fix the response type.
   https://github.com/apache/superset/blob/a6bf041eddcde0247461f35c806414df00ef105e/superset/models/sql_lab.py#L97



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