LIANG751234313 commented on code in PR #64522:
URL: https://github.com/apache/doris/pull/64522#discussion_r3479480541
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -3274,6 +3274,16 @@ private boolean processAddIndex(CreateIndexOp
createIndexOp, OlapTable olapTable
}
AnnIndexPropertiesChecker.checkProperties(indexDef.getProperties());
}
+ //If the table format is V1, the added index is still created in V1
format.
+ // It should be necessary to upgrade the V2 table format and then add
the V2 format index.
+ if (indexDef.getIndexType() == IndexType.INVERTED
+ && olapTable.getInvertedIndexFileStorageFormat() ==
TInvertedIndexFileStorageFormat.V1
+ && !Config.allow_inverted_index_v1_creation) {
+ throw new DdlException("Inverted index V1 is deprecated and no
longer allowed for new index creation."
+ + " Please use inverted index V2."
+ + " You can upgrade the table format with: ALTER TABLE " +
olapTable.getName()
Review Comment:
It has been clearly stated that direct table-property upgrade is not
currently supported.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]