yiguolei commented on code in PR #32195:
URL: https://github.com/apache/doris/pull/32195#discussion_r1524090154


##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -2296,15 +2297,16 @@ public TFrontendPingFrontendResult 
ping(TFrontendPingFrontendRequest request) th
 
     @Override
     public TFetchSchemaTableDataResult 
fetchSchemaTableData(TFetchSchemaTableDataRequest request) throws TException {
-        switch (request.getSchemaTableName()) {
-            case METADATA_TABLE:
-                return MetadataGenerator.getMetadataTable(request);
-            case SCHEMA_TABLE:
-                return MetadataGenerator.getSchemaTableData(request);
-            default:
-                break;
+        if (!request.isSetSchemaTableName()) {
+            return MetadataGenerator.errorResult("Fetch schema table name is 
not set");
+        }
+        // tvf queries
+        if (request.getSchemaTableName() == TSchemaTableName.METADATA_TABLE) {
+            return MetadataGenerator.getMetadataTable(request);
+        } else {

Review Comment:
   change to  else if (request.getSchemaTableName() == 
TSchemaTableName.INFORMATION_SCHEMA) {
               
           } else {
                   throw new TException("xxxxx")
           }
   
   Then we could make sure if we add another ENUM, the logic will not be wrong.



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