yangzhg commented on a change in pull request #1952: add create_time to 
information_schema.tables (issue #1909)
URL: https://github.com/apache/incubator-doris/pull/1952#discussion_r333895995
 
 

 ##########
 File path: be/src/exec/schema_scanner/schema_tables_scanner.cpp
 ##########
 @@ -176,15 +176,30 @@ Status SchemaTablesScanner::fill_one_row(Tuple *tuple, 
MemPool *pool) {
     }
     // creation_time
     {
-        tuple->set_null(_tuple_desc->slots()[14]->null_indicator_offset());
+        void *slot = tuple->get_slot(_tuple_desc->slots()[14]->tuple_offset());
+        DateTimeValue *time_slot = reinterpret_cast<DateTimeValue*>(slot);
+        int64_t create_time = tbl_status.create_time;
+        if (create_time <= 0) {
+            tuple->set_null(_tuple_desc->slots()[14]->null_indicator_offset());
+        } else {
+            time_slot->from_unixtime(create_time, 
TimezoneDatabase::default_time_zone);
+        }
+
     }
     // update_time
     {
         tuple->set_null(_tuple_desc->slots()[15]->null_indicator_offset());
     }
     // check_time
     {
-        tuple->set_null(_tuple_desc->slots()[16]->null_indicator_offset());
+        void *slot = tuple->get_slot(_tuple_desc->slots()[16]->tuple_offset());
+        DateTimeValue *time_slot = reinterpret_cast<DateTimeValue*>(slot);
+        int64_t check_time = tbl_status.last_check_time;
+        if (check_time <= 0) {
+            tuple->set_null(_tuple_desc->slots()[16]->null_indicator_offset());
+        } else {
 
 Review comment:
   done

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to