timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
16.83k stars 852 forks source link

Cache the argument types in first/last functions #7096

Open akuzm opened 4 days ago

akuzm commented 4 days ago

They cannot change after the first call, but currently we're looking them up each row, which adds up to a major part of these functions' run time.

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 86.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 81.77%. Comparing base (59f50f2) to head (80cc163). Report is 242 commits behind head on main.

Files Patch % Lines
src/agg_bookend.c 86.00% 0 Missing and 7 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7096 +/- ## ========================================== + Coverage 80.06% 81.77% +1.70% ========================================== Files 190 202 +12 Lines 37181 37389 +208 Branches 9450 9760 +310 ========================================== + Hits 29770 30573 +803 + Misses 2997 2891 -106 + Partials 4414 3925 -489 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.