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/07 09:03:46 UTC

[GitHub] [doris] luozenglin commented on a diff in pull request #14804: [fix](schemachange) fix the schema change that causes the be core dump.

luozenglin commented on code in PR #14804:
URL: https://github.com/apache/doris/pull/14804#discussion_r1041935517


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableStmt.java:
##########
@@ -77,7 +78,15 @@ public void analyze(Analyzer analyzer) throws UserException {
         if (ops == null || ops.isEmpty()) {
             ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_ALTER_OPERATION);
         }
+        Table table = null;
+        if (!FeConstants.runningUnitTest) {
+            table = Env.getCurrentInternalCatalog().getDbOrDdlException(tbl.getDb())
+                    .getTableOrDdlException(tbl.getTbl());
+        }
         for (AlterClause op : ops) {
+            if (op instanceof AlterTableClause && table instanceof OlapTable) {
+                ((AlterTableClause) op).setOlapTable((OlapTable) table);

Review Comment:
   Done



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