-
Notifications
You must be signed in to change notification settings - Fork 380
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
[#1544] fix(hive): fix null comment in hive table property #1553
Conversation
How about set the default empty string to comment, then other catalogs doesn't need to handle null, and this also fixs #1546 , and more generally we'd better remove all null values when receiving DTO in Gravitino, @jerryshao , what do you think? |
Yeah, I think it is a more robust way other than a point fix, but still we have to handle empty string comment, right? |
Giving an empty string as a default value of the comment field is a good way. Then we only need to deal with the null value in the |
57e3e76
to
bb8c920
Compare
I have updated the PR, could you please review it again, thanks! |
LGTM |
@@ -83,7 +83,7 @@ public TableCreateRequest( | |||
@Nullable Partitioning[] partitioning) { | |||
this.name = name; | |||
this.columns = columns; | |||
this.comment = comment; | |||
this.comment = comment == null ? "" : comment; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we fix this in the server side?
…che#1553) ### What changes were proposed in this pull request? set empty string as default value of comment when creating table ### Why are the changes needed? Fix: apache#1544 ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? IT added
What changes were proposed in this pull request?
set empty string as default value of comment when creating table
Why are the changes needed?
Fix: #1544
Does this PR introduce any user-facing change?
no
How was this patch tested?
IT added