apache / iotdb

Apache IoTDB
https://iotdb.apache.org/
Apache License 2.0
5.63k stars 1.03k forks source link

Optimize first, last, first_by, last_by aggregation process in table model #14192

Closed Beyyes closed 4 days ago

Beyyes commented 4 days ago

Description

For first, first_by, last and last_by aggregations, actually we can only read the first value/statistics and then terminate the process.

There is no need to read all values.


This PR has:


Key changed/added classes (or packages if there are too many classes) in this PR
sonarcloud[bot] commented 4 days ago

Quality Gate Passed Quality Gate passed

Issues
34 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 0% with 120 lines in your changes missing coverage. Please review.

Project coverage is 39.59%. Comparing base (34228a9) to head (3eb07fd). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../relational/aggregation/LastByDescAccumulator.java 0.00% 30 Missing :warning:
...ce/relational/aggregation/LastDescAccumulator.java 0.00% 30 Missing :warning:
...relational/aggregation/FirstByDescAccumulator.java 0.00% 24 Missing :warning:
...e/relational/aggregation/FirstDescAccumulator.java 0.00% 24 Missing :warning:
...ource/relational/aggregation/FirstAccumulator.java 0.00% 6 Missing :warning:
...rce/relational/aggregation/FirstByAccumulator.java 0.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #14192 +/- ## ============================================ - Coverage 39.61% 39.59% -0.03% Complexity 71 71 ============================================ Files 4232 4232 Lines 269671 269791 +120 Branches 32689 32713 +24 ============================================ - Hits 106837 106811 -26 - Misses 162834 162980 +146 ```

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


🚨 Try these New Features: