Skip to content

Commit 0c9c0d0

Browse files
LauraXia123tengqm
andauthored
[#5447][#5720][#5727] create topic, disable create table for hudi, enable schema properties and comment for partial paimon (#5771)
### What changes were proposed in this pull request? 1. Support creating topic/editing topic/deleting topic/viewing topic <img width="1417" alt="image" src="https://github.com/user-attachments/assets/24e0ae59-7ec5-4115-becc-2d8a83dcd8d6"> 2. Fix issue with creating a table for hudi <img width="1481" alt="image" src="https://github.com/user-attachments/assets/bc64eaa9-1b8e-48b2-98b4-899ebfd6eb02"> 3. [Improvement] Paimon catalog, schema properties can be set when backend is jdbc and hive <img width="1441" alt="image" src="https://github.com/user-attachments/assets/9bb2746f-d3b0-4f05-84bc-d5baadb8999d"> <img width="1434" alt="image" src="https://github.com/user-attachments/assets/537ec2fc-a4fa-48ff-bbd1-f606751a2a46"> ### Why are the changes needed? N/A Fix: #5447, #5720, #5727 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? manually --------- Co-authored-by: Qiming Teng <tengqm@outlook.com>
1 parent 5d6589c commit 0c9c0d0

File tree

10 files changed

+687
-46
lines changed

10 files changed

+687
-46
lines changed

web/web/src/app/metalakes/CreateMetalakeDialog.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ const CreateMetalakeDialog = props => {
316316
)}
317317
{item.invalid && (
318318
<FormHelperText className={'twc-text-error-main'}>
319-
Invalid key, matches strings starting with a letter/underscore, followed by alphanumeric
320-
characters, underscores, hyphens, or dots.
319+
Valid key must starts with a letter/underscore, followed by alphanumeric characters,
320+
underscores, hyphens, or dots.
321321
</FormHelperText>
322322
)}
323323
</FormControl>

web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -680,12 +680,12 @@ const CreateCatalogDialog = props => {
680680
)}
681681
{item.key && item.invalid && (
682682
<FormHelperText className={'twc-text-error-main'}>
683-
Invalid key, matches strings starting with a letter/underscore, followed by alphanumeric
684-
characters, underscores, hyphens, or dots.
683+
Valid key must starts with a letter/underscore, followed by alphanumeric characters,
684+
underscores, hyphens, or dots.
685685
</FormHelperText>
686686
)}
687687
{!item.key.trim() && (
688-
<FormHelperText className={'twc-text-error-main'}>Key is required field</FormHelperText>
688+
<FormHelperText className={'twc-text-error-main'}>Key is required</FormHelperText>
689689
)}
690690
</FormControl>
691691
</Grid>

web/web/src/app/metalakes/metalake/rightContent/CreateFilesetDialog.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,12 @@ const CreateFilesetDialog = props => {
461461
)}
462462
{item.key && item.invalid && (
463463
<FormHelperText className={'twc-text-error-main'}>
464-
Invalid key, matches strings starting with a letter/underscore, followed by alphanumeric
465-
characters, underscores, hyphens, or dots.
464+
Valid key must starts with a letter/underscore, followed by alphanumeric characters,
465+
underscores, hyphens, or dots.
466466
</FormHelperText>
467467
)}
468468
{!item.key.trim() && (
469-
<FormHelperText className={'twc-text-error-main'}>Key is required field</FormHelperText>
469+
<FormHelperText className={'twc-text-error-main'}>Key is required</FormHelperText>
470470
)}
471471
</FormControl>
472472
</Grid>

web/web/src/app/metalakes/metalake/rightContent/CreateSchemaDialog.js

+23-17
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,18 @@ import { useState, forwardRef, useEffect, Fragment } from 'react'
2323

2424
import {
2525
Box,
26-
Grid,
2726
Button,
2827
Dialog,
29-
TextField,
30-
Typography,
31-
DialogContent,
3228
DialogActions,
33-
IconButton,
29+
DialogContent,
3430
Fade,
35-
Select,
36-
MenuItem,
37-
InputLabel,
3831
FormControl,
39-
FormHelperText
32+
FormHelperText,
33+
Grid,
34+
IconButton,
35+
InputLabel,
36+
TextField,
37+
Typography
4038
} from '@mui/material'
4139

4240
import Icon from '@/components/Icon'
@@ -90,6 +88,10 @@ const CreateSchemaDialog = props => {
9088
const activatedCatalogDetail = store.activatedDetails
9189
const [cacheData, setCacheData] = useState()
9290

91+
const paimonCatalogBackend =
92+
activatedCatalogDetail?.provider === 'lakehouse-paimon' &&
93+
['hive', 'jdbc'].includes(activatedCatalogDetail?.properties['catalog-backend'])
94+
9395
const {
9496
control,
9597
reset,
@@ -293,7 +295,8 @@ const CreateSchemaDialog = props => {
293295
</FormControl>
294296
</Grid>
295297

296-
{!['jdbc-mysql', 'lakehouse-paimon', 'jdbc-oceanbase'].includes(activatedCatalogDetail?.provider) && (
298+
{(!['jdbc-mysql', 'lakehouse-paimon', 'jdbc-oceanbase'].includes(activatedCatalogDetail?.provider) ||
299+
paimonCatalogBackend) && (
297300
<Grid item xs={12}>
298301
<FormControl fullWidth>
299302
<Controller
@@ -315,12 +318,14 @@ const CreateSchemaDialog = props => {
315318
)}
316319
/>
317320
</FormControl>
321+
{activatedCatalogDetail?.properties['catalog-backend']}
318322
</Grid>
319323
)}
320324

321-
{!['jdbc-postgresql', 'lakehouse-paimon', 'kafka', 'jdbc-mysql', 'jdbc-oceanbase'].includes(
325+
{(!['jdbc-postgresql', 'lakehouse-paimon', 'kafka', 'jdbc-mysql', 'jdbc-oceanbase'].includes(
322326
activatedCatalogDetail?.provider
323-
) && (
327+
) ||
328+
paimonCatalogBackend) && (
324329
<Grid item xs={12} data-refer='schema-props-layout'>
325330
<Typography sx={{ mb: 2 }} variant='body2'>
326331
Properties
@@ -385,12 +390,12 @@ const CreateSchemaDialog = props => {
385390
)}
386391
{item.key && item.invalid && (
387392
<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.
390395
</FormHelperText>
391396
)}
392397
{!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>
394399
)}
395400
</FormControl>
396401
</Grid>
@@ -400,9 +405,10 @@ const CreateSchemaDialog = props => {
400405
</Grid>
401406
)}
402407

403-
{!['jdbc-postgresql', 'lakehouse-paimon', 'kafka', 'jdbc-mysql', 'jdbc-oceanbase'].includes(
408+
{(!['jdbc-postgresql', 'lakehouse-paimon', 'kafka', 'jdbc-mysql', 'jdbc-oceanbase'].includes(
404409
activatedCatalogDetail?.provider
405-
) && (
410+
) ||
411+
paimonCatalogBackend) && (
406412
<Grid item xs={12}>
407413
<Button
408414
size='small'

web/web/src/app/metalakes/metalake/rightContent/CreateTableDialog.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -784,12 +784,12 @@ const CreateTableDialog = props => {
784784
)}
785785
{item.key && item.invalid && (
786786
<FormHelperText className={'twc-text-error-main'}>
787-
Invalid key, matches strings starting with a letter/underscore, followed by alphanumeric
788-
characters, underscores, hyphens, or dots.
787+
Valid key must starts with a letter/underscore, followed by alphanumeric characters,
788+
underscores, hyphens, or dots.
789789
</FormHelperText>
790790
)}
791791
{!item.key.trim() && (
792-
<FormHelperText className={'twc-text-error-main'}>Key is required field</FormHelperText>
792+
<FormHelperText className={'twc-text-error-main'}>Key is required</FormHelperText>
793793
)}
794794
</FormControl>
795795
</Grid>

0 commit comments

Comments
 (0)