-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add support for new date, time data types #2550
Conversation
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.
LGTM! 👍
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.
LGTM, thank you!
@@ -144,6 +145,18 @@ private String convertToString(Result result, String columnName, DataType dataTy | |||
case TEXT: | |||
value = result.getText(columnName); | |||
break; | |||
case DATE: | |||
value = Objects.requireNonNull(result.getDate(columnName)).toString(); |
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.
Since we already have the null check with result.isNull
, I don't think we need to use Objects.requireNonNull()
here. What do you think?
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.
@brfrn169 san,
I added the Objects.requireNonNull()
to fix a warning I saw when adding toString conversion (Method invocation 'toString' may produce 'NullPointerException' ) on IntelliJ. I have removed it.
Thank you.
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.
I added the Objects.requireNonNull() to fix a warning I saw when adding toString conversion (Method invocation 'toString' may produce 'NullPointerException' ) on IntelliJ.
@inv-jishnu Okay, in that case, you can add assert
as follows:
LocalDate date = result.getDate(columnName);
assert date != null;
value = date.toString();
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.
@brfrn169 san,
Thank you.
I have updated the code as suggested.
@brfrn169 san, |
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.
LGTM! Thank you!
Description
In this PR I have added support to newly added date and time data types in scalardb version 3.15 for data loader.
Related issues and/or PRs
NA
Changes made
Added support for the 4 new data types added in scalardb 3.15 in data export and import commands in data laoder.
Checklist
Additional notes (optional)
This changes may not be needed for data loader versions below 3.15
Release notes
NA