Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add api endpoint to get query ast #5212

Merged
merged 4 commits into from
Jul 15, 2024
Merged

add api endpoint to get query ast #5212

merged 4 commits into from
Jul 15, 2024

Conversation

trinity-1686a
Copy link
Contributor

Description

fix #5190
add api endpoint to get the quickwit and tantivy ast for a query, as well as what splits would be hit (taking into account time range and tags), and how many/what kind of storage request are to be expected for each split

How was this PR tested?

tested manually plus added basic unit test

@trinity-1686a trinity-1686a requested review from fmassot and removed request for fulmicoton July 15, 2024 08:55
quickwit_ast: request_metadata.query_ast_resolved,
tantivy_ast: format!("{query:#?}"),
searched_splits: split_ids,
storage_requests: StorageRequestCount {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's cool you extended the thing to a warmup info etc! can we actually get the number of bytes as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's something i would find interesting too, but right now it's not as easy to get. All metadata we get here, we get only through the metastore, with zero call to the storage. To get more, we would need to actually download things from storage, which starts having more of a EXPLAIN ANALYSE than an EXPLAIN semantic. I think that should be left out of scope of this PR, but let's open a ticket so eventually people can pass ?analyze=true or something to get that information as well

Copy link
Contributor

@fulmicoton fulmicoton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments inline.

@trinity-1686a trinity-1686a merged commit ddcb138 into main Jul 15, 2024
4 of 5 checks passed
@trinity-1686a trinity-1686a deleted the trinity/get-query-ast branch July 15, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add an endpoint to get the query ast
2 participants