Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#11235] fix display iceberg table bucketed table partition numBuckets (#11479)

Qian Xia69e90539ed02
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++
})
}