morningman commented on code in PR #38746:
URL: https://github.com/apache/doris/pull/38746#discussion_r1704999698


##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java:
##########
@@ -1084,18 +1103,62 @@ private static TFetchSchemaTableDataResult 
tableOptionsMetadataResult(TSchemaTab
                     }
                     trow.addToColumnValue(new 
TCell().setIntVal(distributionInfo.getBucketNum())); // BUCKETS_NUM
                     trow.addToColumnValue(new 
TCell().setIntVal(olapTable.getPartitionNum())); // PARTITION_NUM
+                    dataBatch.add(trow);
+                } // for table
+            } // for db
+        } // for catalog
+        result.setDataBatch(dataBatch);
+        result.setStatus(new TStatus(TStatusCode.OK));
+        return result;
+    }
+
+    private static TFetchSchemaTableDataResult 
tablePropertiesMetadataResult(TSchemaTableRequestParams params) {
+        if (!params.isSetCurrentUserIdent()) {
+            return errorResult("current user ident is not set.");
+        }
+        TUserIdentity tcurrentUserIdentity = params.getCurrentUserIdent();
+        UserIdentity currentUserIdentity = 
UserIdentity.fromThrift(tcurrentUserIdentity);
+        TFetchSchemaTableDataResult result = new TFetchSchemaTableDataResult();
+        List<TRow> dataBatch = Lists.newArrayList();
+        List<Long> catalogIds = 
Env.getCurrentEnv().getCatalogMgr().getCatalogIds();
+        for (Long catalogId : catalogIds) {

Review Comment:
   Each catalog has its own `information_schema` database.
   So there we should not traverse all catalogs, but only the catalog which 
this query belongs to 



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to