This is an automated email from the ASF dual-hosted git repository.

jerryshao pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/branch-1.3 by this push:
     new 03e1f7c5f7 Issue11235 cherry pick to 1.3 (#11524)
03e1f7c5f7 is described below

commit 03e1f7c5f7853ffd46d9ee03873e4e85b05dfbdd
Author: Qian Xia <[email protected]>
AuthorDate: Tue Jun 9 18:06:53 2026 +0800

    Issue11235 cherry pick to 1.3 (#11524)
    
    ### What changes were proposed in this pull request?
    1. fix iceberg table bucketed table partition numBuckets issue
    2. fix iceberg catalog warehouse required issue
    
    <img width="2550" height="1654" alt="image"
    
src="https://github.com/user-attachments/assets/6c55b69a-a9dd-430e-9913-4631a58a69f4";
    />
    
    ### Why are the changes needed?
    N/A
    
    Fix: #11235
    
    ### Does this PR introduce _any_ user-facing change?
    N/A
    
    ### How was this patch tested?
    N/A
---
 .../app/catalogs/rightContent/CreateCatalogDialog.js    | 17 ++++++++++-------
 .../src/app/catalogs/rightContent/CreateTableDialog.js  |  2 +-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/web-v2/web/src/app/catalogs/rightContent/CreateCatalogDialog.js 
b/web-v2/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
index 570cd1d45c..e50a93ae01 100644
--- a/web-v2/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
+++ b/web-v2/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
@@ -78,6 +78,13 @@ export default function CreateCatalogDialog({ ...props }) {
   const dispatch = useAppDispatch()
   const isShowTestConnect = ['fileset', 'model'].includes(catalogType) || 
currentProvider === 'lakehouse-generic'
 
+  const isRequiredField = prop => {
+    return (
+      prop.required ||
+      (prop.key === 'warehouse' && currentProvider === 'lakehouse-iceberg' && 
['hive', 'jdbc'].includes(catalogBackend))
+    )
+  }
+
   const defaultValues = {
     name: '',
     type: catalogType,
@@ -107,14 +114,14 @@ export default function CreateCatalogDialog({ ...props }) 
{
   )
 
   const isHidden = prop => {
-    const { parentField, hide, required, key } = prop
+    const { parentField, hide, key } = prop
     switch (parentField) {
       case 'catalog-backend':
         return catalogBackend && hide && hide.includes(catalogBackend)
       case 'authentication.type':
         return !authType || (hide && hide.includes(authType))
       default:
-        return !(!editCatalog || ['region', 'location'].includes(key) || 
required)
+        return !(!editCatalog || ['region', 'location'].includes(key) || 
isRequiredField(prop))
     }
   }
 
@@ -522,11 +529,7 @@ export default function CreateCatalogDialog({ ...props }) {
                             key={idx}
                             rules={[
                               {
-                                required:
-                                  prop.required ||
-                                  (prop.key === 'warehouse' &&
-                                    currentProvider === 'lakehouse-iceberg' &&
-                                    ['hive', 'jdbc'].includes(catalogBackend))
+                                required: isRequiredField(prop)
                               }
                             ]}
                             messageVariables={{ label: 
prop.label.toLowerCase() }}
diff --git a/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js 
b/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js
index d3c927d748..99150c7f34 100644
--- a/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js
+++ b/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js
@@ -417,7 +417,7 @@ export default function CreateTableDialog({ ...props }) {
                 const fields = item.fieldName || item.fieldNames.map(f => f[0])
                 form.setFieldValue(['partitions', idxPartiton, 'strategy'], 
item.strategy)
                 form.setFieldValue(['partitions', idxPartiton, 'fieldName'], 
fields)
-                form.setFieldValue(['partitions', idxPartiton, 'number'], 
item.width || item.number)
+                form.setFieldValue(['partitions', idxPartiton, 'number'], 
item.numBuckets || item.width || item.number)
                 idxPartiton++
               })
             }

Reply via email to