@@ -23,20 +23,18 @@ import { useState, forwardRef, useEffect, Fragment } from 'react'
23
23
24
24
import {
25
25
Box ,
26
- Grid ,
27
26
Button ,
28
27
Dialog ,
29
- TextField ,
30
- Typography ,
31
- DialogContent ,
32
28
DialogActions ,
33
- IconButton ,
29
+ DialogContent ,
34
30
Fade ,
35
- Select ,
36
- MenuItem ,
37
- InputLabel ,
38
31
FormControl ,
39
- FormHelperText
32
+ FormHelperText ,
33
+ Grid ,
34
+ IconButton ,
35
+ InputLabel ,
36
+ TextField ,
37
+ Typography
40
38
} from '@mui/material'
41
39
42
40
import Icon from '@/components/Icon'
@@ -90,6 +88,10 @@ const CreateSchemaDialog = props => {
90
88
const activatedCatalogDetail = store . activatedDetails
91
89
const [ cacheData , setCacheData ] = useState ( )
92
90
91
+ const paimonCatalogBackend =
92
+ activatedCatalogDetail ?. provider === 'lakehouse-paimon' &&
93
+ [ 'hive' , 'jdbc' ] . includes ( activatedCatalogDetail ?. properties [ 'catalog-backend' ] )
94
+
93
95
const {
94
96
control,
95
97
reset,
@@ -293,7 +295,8 @@ const CreateSchemaDialog = props => {
293
295
</ FormControl >
294
296
</ Grid >
295
297
296
- { ! [ 'jdbc-mysql' , 'lakehouse-paimon' , 'jdbc-oceanbase' ] . includes ( activatedCatalogDetail ?. provider ) && (
298
+ { ( ! [ 'jdbc-mysql' , 'lakehouse-paimon' , 'jdbc-oceanbase' ] . includes ( activatedCatalogDetail ?. provider ) ||
299
+ paimonCatalogBackend ) && (
297
300
< Grid item xs = { 12 } >
298
301
< FormControl fullWidth >
299
302
< Controller
@@ -315,12 +318,14 @@ const CreateSchemaDialog = props => {
315
318
) }
316
319
/>
317
320
</ FormControl >
321
+ { activatedCatalogDetail ?. properties [ 'catalog-backend' ] }
318
322
</ Grid >
319
323
) }
320
324
321
- { ! [ 'jdbc-postgresql' , 'lakehouse-paimon' , 'kafka' , 'jdbc-mysql' , 'jdbc-oceanbase' ] . includes (
325
+ { ( ! [ 'jdbc-postgresql' , 'lakehouse-paimon' , 'kafka' , 'jdbc-mysql' , 'jdbc-oceanbase' ] . includes (
322
326
activatedCatalogDetail ?. provider
323
- ) && (
327
+ ) ||
328
+ paimonCatalogBackend ) && (
324
329
< Grid item xs = { 12 } data-refer = 'schema-props-layout' >
325
330
< Typography sx = { { mb : 2 } } variant = 'body2' >
326
331
Properties
@@ -385,12 +390,12 @@ const CreateSchemaDialog = props => {
385
390
) }
386
391
{ item . key && item . invalid && (
387
392
< FormHelperText className = { 'twc-text-error-main' } >
388
- Invalid key, matches strings starting with a letter/underscore, followed by alphanumeric
389
- characters, underscores, hyphens, or dots.
393
+ Valid key must starts with a letter/underscore, followed by alphanumeric characters,
394
+ underscores, hyphens, or dots.
390
395
</ FormHelperText >
391
396
) }
392
397
{ ! item . key . trim ( ) && (
393
- < FormHelperText className = { 'twc-text-error-main' } > Key is required field </ FormHelperText >
398
+ < FormHelperText className = { 'twc-text-error-main' } > Key is required</ FormHelperText >
394
399
) }
395
400
</ FormControl >
396
401
</ Grid >
@@ -400,9 +405,10 @@ const CreateSchemaDialog = props => {
400
405
</ Grid >
401
406
) }
402
407
403
- { ! [ 'jdbc-postgresql' , 'lakehouse-paimon' , 'kafka' , 'jdbc-mysql' , 'jdbc-oceanbase' ] . includes (
408
+ { ( ! [ 'jdbc-postgresql' , 'lakehouse-paimon' , 'kafka' , 'jdbc-mysql' , 'jdbc-oceanbase' ] . includes (
404
409
activatedCatalogDetail ?. provider
405
- ) && (
410
+ ) ||
411
+ paimonCatalogBackend ) && (
406
412
< Grid item xs = { 12 } >
407
413
< Button
408
414
size = 'small'
0 commit comments