Re: [PR] [#5447][#5720][#5727] create topic, disable create table for hudi, enable schema properties and comment for partial paimon [gravitino]
jerryshao merged PR #5771: URL: https://github.com/apache/gravitino/pull/5771 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] [#5447][#5720][#5727] create topic, disable create table for hudi, enable schema properties and comment for partial paimon [gravitino]
tengqm commented on PR #5771: URL: https://github.com/apache/gravitino/pull/5771#issuecomment-2522159127 lgtm again. thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] [#5447][#5720][#5727] create topic, disable create table for hudi, enable schema properties and comment for partial paimon [gravitino]
LauraXia123 commented on PR #5771: URL: https://github.com/apache/gravitino/pull/5771#issuecomment-2522077409 @tengqm @orenccl Thanks for your time, I resolved all the issues based on the comment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] [#5447][#5720][#5727] create topic, disable create table for hudi, enable schema properties and comment for partial paimon [gravitino]
orenccl commented on code in PR #5771:
URL: https://github.com/apache/gravitino/pull/5771#discussion_r1871790107
##
web/web/src/app/metalakes/metalake/rightContent/CreateTopicDialog.js:
##
@@ -0,0 +1,438 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use client'
+
+import { useState, forwardRef, useEffect, Fragment } from 'react'
+
+import {
+ Box,
+ Grid,
+ Button,
+ Dialog,
+ TextField,
+ Typography,
+ DialogContent,
+ DialogActions,
+ IconButton,
+ Fade,
+ Select,
+ MenuItem,
+ InputLabel,
Review Comment:
Select, MenuItem, and InputLabel seem unnecessary to import.
##
web/web/src/app/metalakes/metalake/rightContent/CreateTopicDialog.js:
##
@@ -0,0 +1,438 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use client'
+
+import { useState, forwardRef, useEffect, Fragment } from 'react'
+
+import {
+ Box,
+ Grid,
+ Button,
+ Dialog,
+ TextField,
+ Typography,
+ DialogContent,
+ DialogActions,
+ IconButton,
+ Fade,
+ Select,
+ MenuItem,
+ InputLabel,
+ FormControl,
+ FormHelperText
+} from '@mui/material'
+
+import Icon from '@/components/Icon'
+
+import { useAppDispatch } from '@/lib/hooks/useStore'
+import { createTopic, updateTopic } from '@/lib/store/metalakes'
+
+import * as yup from 'yup'
+import { useForm, Controller } from 'react-hook-form'
+import { yupResolver } from '@hookform/resolvers/yup'
+
+import { groupBy } from 'lodash-es'
+import { genUpdates } from '@/lib/utils'
+import { nameRegex, nameRegexDesc, keyRegex } from '@/lib/utils/regex'
+import { useSearchParams } from 'next/navigation'
+import { useAppSelector } from '@/lib/hooks/useStore'
+
+const defaultValues = {
+ name: '',
+ comment: '',
+ propItems: []
+}
+
+const schema = yup.object().shape({
+ name: yup.string().required().matches(nameRegex, nameRegexDesc),
+ propItems: yup.array().of(
+yup.object().shape({
+ required: yup.boolean(),
+ key: yup.string().required(),
+ value: yup.string().when('required', {
+is: true,
+then: schema => schema.required()
+ })
+})
+ )
+})
+
+const Transition = forwardRef(function Transition(props, ref) {
+ return
+})
+
+const CreateTopicDialog = props => {
+ const { open, setOpen, type = 'create', data = {} } = props
+ const searchParams = useSearchParams()
+ const metalake = searchParams.get('metalake')
+ const catalog = searchParams.get('catalog')
+ const schemaName = searchParams.get('schema')
+ const catalogType = searchParams.get('type')
+ const [innerProps, setInnerProps] = useState([])
+ const dispatch = useAppDispatch()
+ const store = useAppSelector(state => state.metalakes)
+ const activatedCatalogDetail = store.activatedDetails
Review Comment:
activatedCatalogDetail seems like an unnecessary variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] [#5447][#5720][#5727] create topic, disable create table for hudi, enable schema properties and comment for partial paimon [gravitino]
tengqm commented on code in PR #5771:
URL: https://github.com/apache/gravitino/pull/5771#discussion_r1871227739
##
web/web/src/app/metalakes/metalake/rightContent/CreateSchemaDialog.js:
##
@@ -315,12 +320,14 @@ const CreateSchemaDialog = props => {
)}
/>
+{activatedCatalogDetail?.['catalog-backend']}
Review Comment:
```suggestion
{activatedCatalogDetail?.properties['catalog-backend']}
```
?
##
web/web/src/app/metalakes/metalake/rightContent/CreateTopicDialog.js:
##
@@ -0,0 +1,438 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use client'
+
+import { useState, forwardRef, useEffect, Fragment } from 'react'
+
+import {
+ Box,
+ Grid,
+ Button,
+ Dialog,
+ TextField,
+ Typography,
+ DialogContent,
+ DialogActions,
+ IconButton,
+ Fade,
+ Select,
+ MenuItem,
+ InputLabel,
+ FormControl,
+ FormHelperText
Review Comment:
I'd suggest we sort this list, even if manually
##
web/web/src/app/metalakes/metalake/rightContent/CreateTopicDialog.js:
##
@@ -0,0 +1,438 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use client'
+
+import { useState, forwardRef, useEffect, Fragment } from 'react'
+
+import {
+ Box,
+ Grid,
+ Button,
+ Dialog,
+ TextField,
+ Typography,
+ DialogContent,
+ DialogActions,
+ IconButton,
+ Fade,
+ Select,
+ MenuItem,
+ InputLabel,
+ FormControl,
+ FormHelperText
+} from '@mui/material'
+
+import Icon from '@/components/Icon'
+
+import { useAppDispatch } from '@/lib/hooks/useStore'
+import { createTopic, updateTopic } from '@/lib/store/metalakes'
+
+import * as yup from 'yup'
+import { useForm, Controller } from 'react-hook-form'
+import { yupResolver } from '@hookform/resolvers/yup'
+
+import { groupBy } from 'lodash-es'
+import { genUpdates } from '@/lib/utils'
+import { nameRegex, nameRegexDesc, keyRegex } from '@/lib/utils/regex'
+import { useSearchParams } from 'next/navigation'
+import { useAppSelector } from '@/lib/hooks/useStore'
+
+const defaultValues = {
+ name: '',
+ comment: '',
+ propItems: []
+}
+
+const schema = yup.object().shape({
+ name: yup.string().required().matches(nameRegex, nameRegexDesc),
+ propItems: yup.array().of(
+yup.object().shape({
+ required: yup.boolean(),
+ key: yup.string().required(),
+ value: yup.string().when('required', {
+is: true,
+then: schema => schema.required()
+ })
+})
+ )
+})
+
+const Transition = forwardRef(function Transition(props, ref) {
+ return
+})
+
+const CreateTopicDialog = props => {
+ const { open, setOpen, type = 'create', data = {} } = props
+ const searchParams = useSearchParams()
+ const metalake = searchParams.get('metalake')
+ const catalog = searchParams.get('catalog')
+ const schemaName = searchParams.get('schema')
+ const catalogType = searchParams.get('type')
+ const [innerProps, setInnerProps] = useState([])
+ const dispatch = useAppDispatch()
+ const store = useAppSelector(state => state.metalakes)
+ const activatedCatalogDetail = store.activatedDetails
+ const [cacheData, setCacheData] = useState()
+
+ const {
+control,
+reset,
+watch,
+setValue,
+getValues,
+handleSubmit,
+trigger,
+formState: { errors }
+ } = useForm({
+defaultValues,
+mode: 'all',
+resolver: yupResolver(schema)
+ })
Re: [PR] [#5447][#5720][#5727] create topic, disable create table for hudi, enable schema properties and comment for partial paimon [gravitino]
orenccl commented on PR #5771: URL: https://github.com/apache/gravitino/pull/5771#issuecomment-2519677174 Hi @LauraXia123, Sure, I’ll be able to review this PR either tonight or tomorrow night (UTC+8). Does that work for you? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] [#5447][#5720][#5727] create topic, disable create table for hudi, enable schema properties and comment for partial paimon [gravitino]
LauraXia123 commented on PR #5771: URL: https://github.com/apache/gravitino/pull/5771#issuecomment-2519642909 @orenccl Hi, Could you help to review the PR when you have a moment? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
