Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] TableWrite skip null fields check, when RowKind is DELETE #4702

Open
1 of 2 tasks
CompassChengHan opened this issue Dec 13, 2024 · 3 comments
Open
1 of 2 tasks
Labels
enhancement New feature or request

Comments

@CompassChengHan
Copy link

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

When deleting a row from PrimaryKey Table, we can set the RowKind type to RowKind.DELETE.

Currently, the TableWriteImpl class will always invoke checkNullability method, ensure all fileds comply with null constraint,

We suggest only verify primary keys null constraint if RowKind is DELETE, then when delete a row, only need provide primary keys.

Solution

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@CompassChengHan CompassChengHan added the enhancement New feature or request label Dec 13, 2024
@JackeyLee007
Copy link
Contributor

Actually, the data will be completed even though only pk provided. And since deletion is rare comparing to insert and update, ignoring other field check wont save too much time.

@JingsongLi
Copy link
Contributor

Actually, the data will be completed even though only pk provided. And since deletion is rare comparing to insert and update, ignoring other field check wont save too much time.

He is not trying to save time, he can only provide the primary key field and no other fields, in order to avoid errors

@JackeyLee007
Copy link
Contributor

But as I tried, it does need only the primary key when deleting a record, eg.

delete from some_table where id = 123;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants