Skip to content
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

Optimize dateTimeConvert scalar function to only parse the format once #8939

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

Jackie-Jiang
Copy link
Contributor

Make dateTimeConvert scalar function stateful so that the format is parsed only once across multiple invocations. The state is persisted within the scope of FunctionInvoker, so multiple functions with the same name won't share the same state.

@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2022

Codecov Report

Merging #8939 (e103485) into master (09fcdd5) will decrease coverage by 44.77%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             master    #8939       +/-   ##
=============================================
- Coverage     69.69%   24.92%   -44.78%     
+ Complexity     4630       47     -4583     
=============================================
  Files          1813     1802       -11     
  Lines         94521    94171      -350     
  Branches      14116    14078       -38     
=============================================
- Hits          65879    23469    -42410     
- Misses        24033    68416    +44383     
+ Partials       4609     2286     -2323     
Flag Coverage Δ
integration1 ?
integration2 24.92% <0.00%> (+0.05%) ⬆️
unittests1 ?
unittests2 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../pinot/common/function/scalar/DateTimeConvert.java 0.00% <0.00%> (ø)
...inot/common/function/scalar/DateTimeFunctions.java 6.25% <ø> (-88.99%) ⬇️
...in/java/org/apache/pinot/spi/utils/StringUtil.java 0.00% <0.00%> (-100.00%) ⬇️
.../java/org/apache/pinot/spi/utils/BooleanUtils.java 0.00% <0.00%> (-100.00%) ⬇️
...java/org/apache/pinot/spi/trace/BaseRecording.java 0.00% <0.00%> (-100.00%) ⬇️
...java/org/apache/pinot/spi/trace/NoOpRecording.java 0.00% <0.00%> (-100.00%) ⬇️
...ava/org/apache/pinot/spi/config/table/FSTType.java 0.00% <0.00%> (-100.00%) ⬇️
...ava/org/apache/pinot/spi/config/user/RoleType.java 0.00% <0.00%> (-100.00%) ⬇️
...ava/org/apache/pinot/spi/data/MetricFieldSpec.java 0.00% <0.00%> (-100.00%) ⬇️
...java/org/apache/pinot/common/tier/TierFactory.java 0.00% <0.00%> (-100.00%) ⬇️
... and 1328 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b2b4aa...e103485. Read the comment docs.

@Jackie-Jiang Jackie-Jiang merged commit 8474bae into apache:master Jun 21, 2022
@Jackie-Jiang Jackie-Jiang deleted the optimize_date_time_convert branch June 21, 2022 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants