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

yuqi1129 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 f2bd7cd919 [Cherry-pick to branch-1.3] [#11342] web-v2(UI): glue 
catalog table follow up issue (#11485) (#11576)
f2bd7cd919 is described below

commit f2bd7cd919f578333605ccf8f20a662a3be2534b
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jun 10 23:29:28 2026 +0800

    [Cherry-pick to branch-1.3] [#11342] web-v2(UI): glue catalog table follow 
up issue (#11485) (#11576)
    
    **Cherry-pick Information:**
    - Original commit: ff37e382eb3f1cfc311e34690eac468481855f68
    - Target branch: `branch-1.3`
    - Status: ✅ Clean cherry-pick (no conflicts)
    
    Co-authored-by: Qian Xia <[email protected]>
---
 .../catalogs/rightContent/CreateSchemaDialog.js    | 11 ++++++++-
 .../app/catalogs/rightContent/CreateTableDialog.js | 28 +++++++++++++++++++---
 web-v2/web/src/config/catalog.js                   | 18 ++++++++++----
 3 files changed, 49 insertions(+), 8 deletions(-)

diff --git a/web-v2/web/src/app/catalogs/rightContent/CreateSchemaDialog.js 
b/web-v2/web/src/app/catalogs/rightContent/CreateSchemaDialog.js
index 2ddffa92cc..94fc9fb327 100644
--- a/web-v2/web/src/app/catalogs/rightContent/CreateSchemaDialog.js
+++ b/web-v2/web/src/app/catalogs/rightContent/CreateSchemaDialog.js
@@ -265,7 +265,16 @@ export default function CreateSchemaDialog({ ...props }) {
                   rules={[
                     { required: true },
                     { type: 'string', max: 64 },
-                    { pattern: isIcebergJdbcCatalog ? dynamicSchemaNameRegex : 
new RegExp(nameRegex) }
+                    { pattern: isIcebergJdbcCatalog ? dynamicSchemaNameRegex : 
new RegExp(nameRegex) },
+                    {
+                      validator: (_, value) => {
+                        if (!isGlueProvider || !value || !value.includes('-')) 
{
+                          return Promise.resolve()
+                        }
+
+                        return Promise.reject(new Error('Glue schema name does 
not support hyphen (-).'))
+                      }
+                    }
                   ]}
                   messageVariables={{ label: 'schema name' }}
                 >
diff --git a/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js 
b/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js
index 99150c7f34..30bc3d72f3 100644
--- a/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js
+++ b/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js
@@ -137,6 +137,27 @@ export default function CreateTableDialog({ ...props }) {
   const isSupportDefaultValue = defaultValueSupported.includes(provider)
   const dispatch = useAppDispatch()
 
+  const getActiveTableDefaultProps = () => {
+    const props = tableDefaultProps[provider] || []
+    if (provider !== 'glue') {
+      return props
+    }
+
+    const tableFormat = values?.['table-format']?.toLowerCase()
+
+    return props.filter(prop => {
+      if (!prop.hide?.length) {
+        return true
+      }
+
+      if (!tableFormat) {
+        return false
+      }
+
+      return !prop.hide.map(item => item.toLowerCase()).includes(tableFormat)
+    })
+  }
+
   useResetFormOnCloseModal({
     form,
     open
@@ -749,8 +770,9 @@ export default function CreateTableDialog({ ...props }) {
             submitData.columns.forEach(col => {
               delete col.uniqueId
             })
-            if (tableDefaultProps[provider]) {
-              tableDefaultProps[provider].forEach(item => {
+            const activeDefaultProps = getActiveTableDefaultProps()
+            if (activeDefaultProps.length) {
+              activeDefaultProps.forEach(item => {
                 if (values[item.key]) {
                   submitData.properties[item.key] = values[item.key]
                 }
@@ -1570,7 +1592,7 @@ export default function CreateTableDialog({ ...props }) {
                     <div className='flex flex-col gap-2'>
                       {!editTable &&
                         tableDefaultProps[provider] &&
-                        tableDefaultProps[provider].map((prop, idx) => {
+                        getActiveTableDefaultProps().map((prop, idx) => {
                           const isLocationRequired =
                             prop.key === 'location' &&
                             provider === 'lakehouse-generic' &&
diff --git a/web-v2/web/src/config/catalog.js b/web-v2/web/src/config/catalog.js
index 76d3d6b02c..2fcf072a57 100644
--- a/web-v2/web/src/config/catalog.js
+++ b/web-v2/web/src/config/catalog.js
@@ -139,6 +139,11 @@ export const tableDefaultProps = {
     }
   ],
   glue: [
+    {
+      key: 'location',
+      defaultValue: '',
+      description: 'Table storage location, e.g. s3://my-bucket/path'
+    },
     {
       key: 'table-format',
       defaultValue: '',
@@ -148,16 +153,19 @@ export const tableDefaultProps = {
     {
       key: 'metadata_location',
       defaultValue: '',
+      hide: ['hive'],
       description: 'Iceberg metadata file path'
     },
     {
       key: 'format',
-      defaultValue: '',
+      defaultValue: 'PARQUET',
+      hide: ['iceberg'],
       select: ['TEXTFILE', 'SEQUENCEFILE', 'RCFILE', 'ORC', 'PARQUET', 'AVRO', 
'JSON', 'CSV', 'REGEX']
     },
     {
       key: 'input-format',
-      defaultValue: 'org.apache.hadoop.mapred.TextInputFormat',
+      defaultValue: 
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat',
+      hide: ['iceberg'],
       defaultValueOptions: {
         TEXTFILE: 'org.apache.hadoop.mapred.TextInputFormat',
         SEQUENCEFILE: 'org.apache.hadoop.mapred.SequenceFileInputFormat',
@@ -172,7 +180,8 @@ export const tableDefaultProps = {
     },
     {
       key: 'output-format',
-      defaultValue: 
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat',
+      defaultValue: 
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat',
+      hide: ['iceberg'],
       defaultValueOptions: {
         TEXTFILE: 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat',
         SEQUENCEFILE: 'org.apache.hadoop.mapred.SequenceFileOutputFormat',
@@ -187,7 +196,8 @@ export const tableDefaultProps = {
     },
     {
       key: 'serde-lib',
-      defaultValue: 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe',
+      defaultValue: 
'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe',
+      hide: ['iceberg'],
       defaultValueOptions: {
         TEXTFILE: 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe',
         SEQUENCEFILE: 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe',

Reply via email to