This is an automated email from the ASF dual-hosted git repository.
lauraxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 0ef6da977c [#9830] web(UI): doris table edit (#9901)
0ef6da977c is described below
commit 0ef6da977c0010b295cf1a901a59245ef12d5578
Author: Tanay Paul <[email protected]>
AuthorDate: Fri Feb 27 11:48:57 2026 +0530
[#9830] web(UI): doris table edit (#9901)
fix: Add missing immutable property to Doris and StarRocks table configs
(#9830)
- Add immutable: [] to jdbc-doris configuration
- Add immutable: [] to jdbc-starrocks configuration
- Add defensive optional chaining in CreateTableDialog.js
This fixes a TypeError when editing Doris/StarRocks tables in the UI.
The code was calling .includes() on undefined immutable property,
causing the dialog to crash with 'Application error: a client-side
exception has occurred'.
Fixes #9830
---
web/web/src/app/metalakes/metalake/rightContent/CreateTableDialog.js | 4 ++--
web/web/src/lib/utils/initial.js | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/web/web/src/app/metalakes/metalake/rightContent/CreateTableDialog.js
b/web/web/src/app/metalakes/metalake/rightContent/CreateTableDialog.js
index 371de52f4a..6f647e92d5 100644
--- a/web/web/src/app/metalakes/metalake/rightContent/CreateTableDialog.js
+++ b/web/web/src/app/metalakes/metalake/rightContent/CreateTableDialog.js
@@ -207,7 +207,7 @@ const CreateTableDialog = props => {
updatedProps.forEach(item => (item.hasDuplicateKey = false))
}
- const isReserved = propInfo.reserved.includes(updatedProps[index].key)
+ const isReserved = propInfo.reserved?.includes(updatedProps[index].key) ||
false
updatedProps[index].isReserved = isReserved
setInnerProps(updatedProps)
@@ -549,7 +549,7 @@ const CreateTableDialog = props => {
return {
key,
value,
- disabled: propInfo.reserved.includes(key) ||
propInfo.immutable.includes(key)
+ disabled: propInfo.reserved?.includes(key) ||
propInfo.immutable?.includes(key)
}
})
diff --git a/web/web/src/lib/utils/initial.js b/web/web/src/lib/utils/initial.js
index db6334b4be..005629b194 100644
--- a/web/web/src/lib/utils/initial.js
+++ b/web/web/src/lib/utils/initial.js
@@ -678,11 +678,13 @@ const relationalTablePropInfoMap = {
},
'jdbc-starrocks': {
reserved: [],
+ immutable: [],
allowDelete: true,
allowAdd: true
},
'jdbc-doris': {
reserved: [],
+ immutable: [],
allowDelete: true,
allowAdd: true
},