This is an automated email from the ASF dual-hosted git repository.
diqiu50 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 ff37e382eb [#11342] web-v2(UI): glue catalog table follow up issue
(#11485)
ff37e382eb is described below
commit ff37e382eb3f1cfc311e34690eac468481855f68
Author: Qian Xia <[email protected]>
AuthorDate: Wed Jun 10 21:56:14 2026 +0800
[#11342] web-v2(UI): glue catalog table follow up issue (#11485)
### What changes were proposed in this pull request?
1. glue schema name not support hyphen (-)
2. glue table props table-format mapping props
3. add location prop for glue table
<img width="1872" height="1094" alt="image"
src="https://github.com/user-attachments/assets/c08bbd2d-7bf6-4b72-bf59-daca2c0a98bc"
/>
<img width="2272" height="1472" alt="image"
src="https://github.com/user-attachments/assets/711f8aea-7796-4030-bf62-e18e2b8f2d49"
/>
<img width="2076" height="1438" alt="image"
src="https://github.com/user-attachments/assets/9910ffad-46e5-4e1a-8273-a3d26737f14f"
/>
### Why are the changes needed?
N/A
Fix: #11342
### Does this PR introduce _any_ user-facing change?
N/A
### How was this patch tested?
manually
---
.../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',