You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "s7monk (via GitHub)" <gi...@apache.org> on 2024/06/01 15:22:36 UTC
[PR] [Feature] Support edit column [paimon-webui]
s7monk opened a new pull request, #278:
URL: https://github.com/apache/paimon-webui/pull/278
close: https://github.com/apache/paimon-webui/issues/277
### Purpose
Support edit column.



--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature] Support editing column [paimon-webui]
Posted by "s7monk (via GitHub)" <gi...@apache.org>.
s7monk commented on code in PR #278:
URL: https://github.com/apache/paimon-webui/pull/278#discussion_r1623756032
##########
paimon-web-ui/src/api/models/catalog/types/table.ts:
##########
@@ -67,11 +74,13 @@ export interface TableDetail {
}
export interface ColumnDTO {
+ id: number
Review Comment:
Yes, you don't need to pass the id when adding a column, but you need to pass the id and sort when editing a column so that the backend can determine the new order of each field. Do I need to create a new user to edit it instead of sharing the same one with the creation?
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature] Support editing column [paimon-webui]
Posted by "s7monk (via GitHub)" <gi...@apache.org>.
s7monk commented on code in PR #278:
URL: https://github.com/apache/paimon-webui/pull/278#discussion_r1623762913
##########
paimon-web-ui/src/views/metadata/components/columns-form/index.tsx:
##########
@@ -115,16 +135,20 @@ export default defineComponent({
<n-card
bordered={true}
title={`${this.isEdit ? 'Edit' : 'Create'} Column`}
- style="width: 1100px"
+ style={{ width: this.isEdit ? '1000px' : '1110px' }}
>
{{
- 'header-extra': () => (
- <n-button quaternary circle size="tiny" onClick={this.handleAddOption}>
- <n-icon>
- <Add />
- </n-icon>
- </n-button>
- ),
+ 'header-extra': () => {
+ if (!this.isEdit) {
+ return (
+ <n-button quaternary circle size="tiny" onClick={this.handleAddOption}>
+ <n-icon>
+ <Add />
+ </n-icon>
+ </n-button>
+ )
+ }
+ },
Review Comment:
Currently, the backend interface does not support adding columns when editing, but only supports modifying existing columns. If necessary, you can modify the backend interface later.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature] Support editing column [paimon-webui]
Posted by "zhangmo8 (via GitHub)" <gi...@apache.org>.
zhangmo8 commented on code in PR #278:
URL: https://github.com/apache/paimon-webui/pull/278#discussion_r1623739059
##########
paimon-web-ui/src/views/metadata/components/columns-form/index.tsx:
##########
@@ -115,16 +135,20 @@ export default defineComponent({
<n-card
bordered={true}
title={`${this.isEdit ? 'Edit' : 'Create'} Column`}
- style="width: 1100px"
+ style={{ width: this.isEdit ? '1000px' : '1110px' }}
>
{{
- 'header-extra': () => (
- <n-button quaternary circle size="tiny" onClick={this.handleAddOption}>
- <n-icon>
- <Add />
- </n-icon>
- </n-button>
- ),
+ 'header-extra': () => {
+ if (!this.isEdit) {
+ return (
+ <n-button quaternary circle size="tiny" onClick={this.handleAddOption}>
+ <n-icon>
+ <Add />
+ </n-icon>
+ </n-button>
+ )
+ }
+ },
Review Comment:
Please support the new column when editing.
##########
paimon-web-ui/src/api/models/catalog/types/table.ts:
##########
@@ -67,11 +74,13 @@ export interface TableDetail {
}
export interface ColumnDTO {
+ id: number
Review Comment:
Id is not required when creating a new column.
##########
paimon-web-ui/src/views/metadata/components/columns-form/index.tsx:
##########
@@ -47,6 +47,7 @@ export default defineComponent({
const catalogStore = useCatalogStore()
const [, createFetch, { loading }] = createColumns()
+ const [, editColumn] = alterTable()
Review Comment:
Why not loading
##########
paimon-web-ui/src/views/metadata/components/table-column-content/index.tsx:
##########
@@ -26,10 +26,12 @@ const props = {
type: Array as PropType<ColumnDTO[]>,
default: () => [],
},
+ 'isEdit': Boolean,
Review Comment:
Need to use proptype of vue for packaging
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature] Support editing column [paimon-webui]
Posted by "s7monk (via GitHub)" <gi...@apache.org>.
s7monk commented on code in PR #278:
URL: https://github.com/apache/paimon-webui/pull/278#discussion_r1623763012
##########
paimon-web-ui/src/views/metadata/components/columns-form/index.tsx:
##########
@@ -47,6 +47,7 @@ export default defineComponent({
const catalogStore = useCatalogStore()
const [, createFetch, { loading }] = createColumns()
+ const [, editColumn] = alterTable()
Review Comment:
I have added.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature] Support editing column [paimon-webui]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas merged PR #278:
URL: https://github.com/apache/paimon-webui/pull/278
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature] Support editing column [paimon-webui]
Posted by "s7monk (via GitHub)" <gi...@apache.org>.
s7monk commented on code in PR #278:
URL: https://github.com/apache/paimon-webui/pull/278#discussion_r1623756032
##########
paimon-web-ui/src/api/models/catalog/types/table.ts:
##########
@@ -67,11 +74,13 @@ export interface TableDetail {
}
export interface ColumnDTO {
+ id: number
Review Comment:
Yes, don't need to pass the id when adding a column, but need to pass the id and sort when editing a column so that the backend can determine the new order of each field. Do I need to create a new user to edit it instead of sharing the same one with the creation?
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature] Support editing column [paimon-webui]
Posted by "s7monk (via GitHub)" <gi...@apache.org>.
s7monk commented on code in PR #278:
URL: https://github.com/apache/paimon-webui/pull/278#discussion_r1623765123
##########
paimon-web-ui/src/views/metadata/components/table-column-content/index.tsx:
##########
@@ -26,10 +26,12 @@ const props = {
type: Array as PropType<ColumnDTO[]>,
default: () => [],
},
+ 'isEdit': Boolean,
Review Comment:
done.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org