You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/19 09:36:34 UTC

[GitHub] [doris] weizuo93 commented on a diff in pull request #14518: [Enhancement](action) Support request the table schema of Non-OLAP table through http action

weizuo93 commented on code in PR #14518:
URL: https://github.com/apache/doris/pull/14518#discussion_r1051987235


##########
fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/TableSchemaAction.java:
##########
@@ -67,41 +77,74 @@ protected Object schema(
             String fullDbName = getFullDbName(dbName);
             // check privilege for select, otherwise return 401 HTTP status
             checkTblAuth(ConnectContext.get().getCurrentUserIdentity(), fullDbName, tblName, PrivPredicate.SELECT);
-            OlapTable table;
+            CatalogIf catalog;
+            DatabaseIf db;
+            TableIf table;
             try {
-                Database db = Env.getCurrentInternalCatalog().getDbOrMetaException(fullDbName);
-                table = (OlapTable) db.getTableOrMetaException(tblName, Table.TableType.OLAP);
-            } catch (MetaNotFoundException e) {
+                catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(InternalCatalog.INTERNAL_CATALOG_NAME);
+                db = catalog.getDbOrAnalysisException(fullDbName);
+                table = db.getTableOrAnalysisException(tblName);

Review Comment:
   @stalary Thanks for your comment. This patch is to support querying doris `view` through spark, but there are some problems. I will close this PR.



-- 
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-unsubscribe@doris.apache.org

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


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