jerryshao commented on code in PR #14917:
URL: https://github.com/apache/gravitino/pull/14917#discussion_r4623938996
##########
web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js:
##########
@@ -597,6 +609,16 @@ export default function CreateTableDialog({ ...props }) {
form
.validateFields()
.then(async () => {
+ if (provider === 'jdbc-mysql' &&
hasMySQLAutoIncrementRenameConflict(cacheData?.columns, values?.columns)) {
Review Comment:
[P2] On `jdbc-oceanbase`, renaming an AutoIncrement column and disabling the
flag still submits the failing combination because this guard only checks
`jdbc-mysql`. `OceanBaseTableOperations.updateColumnAutoIncrementDefinition`
also looks up the new name in the original table before executing the rename.
Please extend the safeguard and its guidance to OceanBase, or make that
connector account for pending renames, with a provider-specific regression test.
##########
web-v2/web/src/lib/utils/index.js:
##########
@@ -190,6 +256,18 @@ export const genUpdates = (originalData, newData,
disableUpdate = false) => {
nullable: newColumnsMap[key].nullable
})
}
+ const newAutoIncrement = newColumnsMap[key].autoIncrement
+ if (
+ newAutoIncrement !== undefined &&
+ newAutoIncrement !== null &&
+ Boolean(originalColumnsMap[key].autoIncrement) !==
Boolean(newAutoIncrement)
+ ) {
+ updates.push({
Review Comment:
[P2] Disabling AutoIncrement and changing the same column's comment in one
save emits the AutoIncrement update followed by the comment update.
`MysqlTableOperations.updateColumnCommentFieldDefinition` rebuilds the column
using its original AutoIncrement flag, so the later MODIFY restores
AUTO_INCREMENT. Please compose these changes against the pending column state,
or block conflicting combined edits with separate-save guidance. Add a
regression case that checks the resulting column definition, not only the
individual update payloads.
--
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]