Index read view supports the `quantile` method now
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Since: 3.6.0
Now quantile method (tarantool/doc#4975) can be used in read view:
rv = box.read_view.open()
rv.space.test.index.pk:quantile(0.5, {10}, {20})
The method also works with read view spaces:
rv.space.test:quantile(0.5, {10}, {20})
Also, raw read views (ones that can be used from C API) are popualted
with this method as well:
API_EXPORT int
box_raw_read_view_quantile(
const box_raw_read_view_index_t *index, double level,
const char *begin_key, const char *begin_key_end, const char *end_key,
const char *end_key_end, const char **quantile_key,
const char **quantile_key_end);
Note that one needs to call box_region_truncate after calling
raw read view quantile sine the result (the quantile key)
is allocated on region.
Requested by @drewdzzz in https://github.com/tarantool/tarantool-ee/commit/d4c7384e341131a9f55b06c3b67efdc0b25b7348.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the read view documentation for the existing quantile method and the raw read view API entry points shown in the issue. Document the Lua index and space examples, the C API signature, and the need to call box_region_truncate after the raw result; done means all three usage paths and the region-lifetime note are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua
- Domain
- database, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100