Datetime transform functions#8397
Merged
richardstartin merged 3 commits intoapache:masterfrom Mar 24, 2022
Merged
Conversation
xiangfu0
approved these changes
Mar 24, 2022
Member
Author
|
I've reverted to JODA because I noticed that |
Codecov Report
@@ Coverage Diff @@
## master #8397 +/- ##
=============================================
+ Coverage 30.54% 64.08% +33.53%
- Complexity 0 4275 +4275
=============================================
Files 1642 1610 -32
Lines 86112 84709 -1403
Branches 13000 12853 -147
=============================================
+ Hits 26304 54285 +27981
+ Misses 57420 26499 -30921
- Partials 2388 3925 +1537
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
95369f4 to
6c12951
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR starts with a small refactoring to allow
TransformFunctionTypes to have aliases, then introducesTransformFunctions for the following functions:yearyearOfWeekyowmonthweekweekOfYearquarterdayOfWeekdowdayOfYeardoydayOfMonthdayhourminutemillisecondThe transform functions are tested against the
@ScalarFunctions.The motivation for the change is the high cost of using scalar functions in transforms. Here is the allocation rate observed for
vs the similar
When scalar function is used, 16% of samples were in verifying accessibility of the
Method-@ScalarFunctionshould be used only as a last resort.