This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit 4b592efc4184489f8303c6b79d352916d1cf8ab3 Author: Mingyu Chen <morning...@163.com> AuthorDate: Sat Dec 10 18:45:25 2022 +0800 [fix](information_schema) fix messy code of CHECK_TIME column of informatio_schema.tables (#14915) --- .../java/org/apache/doris/service/FrontendServiceImpl.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java index 5742042697..e0a622b55c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java +++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java @@ -30,7 +30,6 @@ import org.apache.doris.catalog.Table; import org.apache.doris.catalog.TableIf; import org.apache.doris.catalog.TableIf.TableType; import org.apache.doris.catalog.external.ExternalDatabase; -import org.apache.doris.catalog.external.ExternalTable; import org.apache.doris.cluster.Cluster; import org.apache.doris.cluster.ClusterNamespace; import org.apache.doris.common.AnalysisException; @@ -314,21 +313,16 @@ public class FrontendServiceImpl implements FrontendService.Iface { if (matcher != null && !matcher.match(table.getName())) { continue; } - long lastCheckTime = 0; - if (table instanceof Table) { - lastCheckTime = ((Table) table).getLastCheckTime(); - } else { - lastCheckTime = ((ExternalTable) table).getLastCheckTime(); - } + long lastCheckTime = table.getLastCheckTime() <= 0 ? 0 : table.getLastCheckTime(); 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); + status.setLastCheckTime(lastCheckTime / 1000); status.setUpdateTime(table.getUpdateTime() / 1000); - status.setCheckTime(lastCheckTime); + status.setCheckTime(lastCheckTime / 1000); status.setCollation("utf-8"); status.setRows(table.getRowCount()); status.setDataLength(table.getDataLength()); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org