github-actions[bot] commented on code in PR #64933:
URL: https://github.com/apache/doris/pull/64933#discussion_r3489941092


##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -739,17 +745,39 @@ public TListTableStatusResult 
listTableStatus(TGetTablesParams params) throws TE
                             TTableStatus status = new TTableStatus();
                             status.setName(table.getName());
                             status.setType(table.getMysqlType());
-                            status.setEngine(table.getEngine());
                             status.setComment(table.getComment());
-                            status.setCreateTime(table.getCreateTime());
-                            status.setLastCheckTime(lastCheckTime / 1000);
-                            status.setUpdateTime(table.getUpdateTime() / 1000);
-                            status.setCheckTime(lastCheckTime / 1000);
-                            status.setCollation("utf-8");
-                            status.setRows(table.getCachedRowCount());
-                            status.setDataLength(table.getDataLength());
-                            status.setAvgRowLength(table.getAvgRowLength());
-                            status.setIndexLength(table.getIndexLength());
+                            if (needTableStatusColumn(requiredColumns, 
"ENGINE")) {
+                                status.setEngine(table.getEngine());
+                            }
+                            if (needTableStatusColumn(requiredColumns, 
"CREATE_TIME")) {
+                                status.setCreateTime(table.getCreateTime());
+                            }
+                            if (needTableStatusColumn(requiredColumns, 
"LAST_CHECK_TIME")) {
+                                status.setLastCheckTime(lastCheckTime / 1000);
+                            }
+                            if (needTableStatusColumn(requiredColumns, 
"UPDATE_TIME")) {
+                                status.setUpdateTime(table.getUpdateTime() / 
1000);
+                            }
+                            if (needTableStatusColumn(requiredColumns, 
"CHECK_TIME")) {

Review Comment:
   This pruning changes the thrift contract for `CHECK_TIME`. The BE schema 
scanner still fills the `CHECK_TIME` column from 
`tbl_status.__isset.last_check_time` / `tbl_status.last_check_time`, but when 
the query projects only `CHECK_TIME` the required set contains `CHECK_TIME` and 
this branch only sets `check_time`; `LAST_CHECK_TIME` is not requested, so 
`last_check_time` remains unset and the BE returns NULL. Please either keep 
setting `last_check_time` when `CHECK_TIME` is requested or switch the BE 
scanner to consume `check_time` for the `CHECK_TIME` column, and cover a 
request for only `CHECK_TIME`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to