delta-io / delta-kernel-rs

A native Delta implementation for integration with any query engine
Apache License 2.0
144 stars 41 forks source link

[chore] Rename EngineData::length as EngineData::len #471

Closed scovich closed 4 days ago

scovich commented 5 days ago

What changes are proposed in this pull request?

Rust uses methods called len not length, but we currently have EngineData::length. Fix it.

Also add a corresponding is_empty method to keep clippy happy.

This PR affects the following public APIs

See above. Name change of public method. If there are breaking changes, please ensure the breaking-changes label gets added by CI, and describe why the changes are needed.

How was this change tested?

Compilation + unit tests.

codecov[bot] commented 5 days ago

Codecov Report

Attention: Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 79.54%. Comparing base (cca04a4) to head (47ba12a). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
kernel/src/engine_data.rs 0.00% 3 Missing :warning:
ffi/src/scan.rs 0.00% 1 Missing :warning:
kernel/src/scan/mod.rs 50.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #471 +/- ## ========================================== - Coverage 79.56% 79.54% -0.02% ========================================== Files 56 56 Lines 12253 12256 +3 Branches 12253 12256 +3 ========================================== Hits 9749 9749 - Misses 1978 1981 +3 Partials 526 526 ```

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

zachschuermann commented 5 days ago

ugh I'm not sure why codecov keeps reporting red builds

scovich commented 4 days ago

ugh I'm not sure why codecov keeps reporting red builds

For a small PR like this one, even a handful of untested lines (including changes to existing untested code) is enough to fail it. Here, the new is_empty method has no callers (added only to appease clippy -- we don't normally deal in empty engine data).