Youngwb commented on a change in pull request #4582:
URL: https://github.com/apache/incubator-doris/pull/4582#discussion_r486247695



##########
File path: 
fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableStmt.java
##########
@@ -79,11 +82,28 @@ public void analyze(Analyzer analyzer) throws UserException 
{
     public void rewriteAlterClause(OlapTable table) throws UserException {
         List<AlterClause> clauses = new ArrayList<>();
         for (AlterClause alterClause : ops) {
-            if (alterClause instanceof EnableFeatureClause
-                    && ((EnableFeatureClause) alterClause).getFeature() == 
EnableFeatureClause.Features.BATCH_DELETE) {
+            if (alterClause instanceof EnableFeatureClause) {
+                EnableFeatureClause.Features alterFeature  = 
((EnableFeatureClause) alterClause).getFeature();
+                if (alterFeature == null || alterFeature == 
EnableFeatureClause.Features.UNKNOWN) {
+                    throw new AnalysisException("unknown feature for alter 
clause");
+                }
                 if (table.getKeysType() != KeysType.UNIQUE_KEYS) {
-                    throw new AnalysisException("Batch delete only supported 
in unique tables.");
+                    throw new AnalysisException("enable feature only supported 
in unique tables now.");

Review comment:
       sequence column also only support UNIQUE_KEYS, and I add "now" in the 
exception for current  implementation, i think if we have feature for other 
tables in the future, we can change this check




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to