Closed atyoshioka closed 2 weeks ago
The pull request introduces modifications to the get_column_statistics
method in the Database
implementation located in src/column_statistics/load.rs
. Key changes include an early return for empty time
arguments that raises an InvalidInput
error, streamlining the query construction by integrating filtering directly into the query, and updating the Diesel import statement to include BoolExpressionMethods
. These changes enhance error handling and simplify the query logic while preserving the method's existing functionality.
File Path | Change Summary |
---|---|
src/column_statistics/load.rs | - Modified get_column_statistics method to return InvalidInput for empty time argument. |
- Streamlined query construction by removing separate conditional check for time.is_empty() . |
|
- Updated import statement to include BoolExpressionMethods . |
In the code where rabbits hop,
An empty time now makes us stop.
With queries sleek and errors caught,
Our statistics dance, a joyful thought!
Hooray for changes, swift and bright,
In the database, all feels right! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 0%
with 14 lines
in your changes missing coverage. Please review.
Project coverage is 67.69%. Comparing base (
aaab9e7
) to head (6b1d71e
).
Files with missing lines | Patch % | Lines |
---|---|---|
src/column_statistics/load.rs | 0.00% | 14 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
As far as I understand, [NaiveDateTime!]!
typically means it can be an empty list (though not null, and each element if present must not be null). Can you help me understand why time
must not be empty in this case?
Thanks! My understanding about GraphQL schema was wrong. Will be closing this.
This PR is to return an error if
time
is empty. ThecolumnStatistics
is defined as follows andtime
must not be empty.(I'm not sure why the return type is still
JSON
)Summary by CodeRabbit
Bug Fixes
New Features