DateTimeFormatter-based FORMATDATETIME and PARSEDATETIME and other changes #3281
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FORMATDATETIME
andPARSEDATETIME
now use API from Java 8 to parse and format values. It supports resolution up to nanoseconds, LMT, proleptic Gregorian calendar and much wider range of values. I tried to preserve their old behavior, but I changed data type ofPARSEDATETIME
fromTIMESTAMP
toTIMESTAMP(9) WITH TIME ZONE
to avoid issues with DST and other transitions. I also added a simple cache for 100 most recently used formats.JSR310Utils
now have normal types of parameters and results instead ofObject
that was used for binary compatibility with Java 7.Database.checkPowerOff()
now only checks whether this testing-only feature is in use, and if it is, calls new second method with the rest of its old code. With this change second method isn't compiled and isn't inlined by JVM, because it isn't used.