Skip to content

Index read view supports the quantile method now #5495

@TarantoolBot

Description

@TarantoolBot

Since: 3.6.0

Now quantile method (#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions