Skip to content

[backport 3.2] box: fix drop_while integration with index:pairs#10767

Merged
sergepetrenko merged 2 commits intotarantool:release/3.2from
sergepetrenko:luafun-3.2
Oct 31, 2024
Merged

[backport 3.2] box: fix drop_while integration with index:pairs#10767
sergepetrenko merged 2 commits intotarantool:release/3.2from
sergepetrenko:luafun-3.2

Conversation

@sergepetrenko
Copy link
Collaborator

No description provided.

The commit bumps luafun to the new version with a bunch of bugfixes:
* Now `chain` works correctly with iterators without `param`.
* Now `drop_while` supports stateful iterators.
* The module is populated with missing `maximum_by` alias of `max_by`.
* Now `nth` and `length` work correctly with other luafun iterators.

Since our index iterators are stateful (can return different values
with the same `state` passed), the old `drop_while` implementation
didn't work well with them - it was skipping an extra element.
The bump resolves this issue.

Note that there are still methods that don't work correctly with
`index:pairs` - `cycle`, `head` and `is_null`.

Closes tarantool#6403

NO_DOC=bugfix

(cherry picked from commit ec75886)
When fixing `drop_while` function in `luafun` submodule, we wrote a
benchmark to choose the most efficient solution - let's put it to our
perf test suite. The commit creates a new perf test for `luafun` module
and puts there above-mentioned benchmark.

NO_TEST=perftest
NO_CHANGELOG=perftest
NO_DOC=perftest

(cherry picked from commit 6ae595f)
@coveralls
Copy link

Coverage Status

coverage: 87.273% (-0.003%) from 87.276%
when pulling f9d8865 on sergepetrenko:luafun-3.2
into 644b319
on tarantool:release/3.2
.

@sergepetrenko sergepetrenko added the full-ci Enables all tests for a pull request label Oct 31, 2024
@sergepetrenko sergepetrenko merged commit 2250732 into tarantool:release/3.2 Oct 31, 2024
@sergepetrenko sergepetrenko deleted the luafun-3.2 branch March 17, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables all tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants