-
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
Change DATE type encoding to integer #2491
Conversation
public static int encode(LocalDate date) { | ||
return Math.toIntExact(date.toEpochDay()); |
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.
Encode DATE value as int
instead of long
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!
I've updated the release note.
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!
# Conflicts: # core/src/test/java/com/scalar/db/storage/jdbc/JdbcAdminTestBase.java
# Conflicts: # core/src/test/java/com/scalar/db/storage/jdbc/JdbcAdminTestBase.java
Description
The DATE type value was encoded as a
long
for DynamoDB, Cosmos DB, and SQLite. But since the full range of DATE values fits into anint
, we change the encoding type fromlong
toint
Related issues and/or PRs
Changes made
Updates the DynamoDB, CosmosDB, and SQLite adapters to encode DATE value as
int
instead oflong
Checklist
Additional notes (optional)
N/A
Release notes
Same as #2468