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

Implement head and taste operators #2891

Merged
merged 7 commits into from Jan 30, 2023
Merged

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented Jan 29, 2023

The head [n] operator limits the result to the first n events. The limit defaults to 1.

The taste [n] operator behaves similarly, except that the limit is applied per unique schema. E.g., running vast export json 'taste' will return exactly one event of each schema in the database.

Tasks

Edit tasklist title
Beta Give feedback Tasklist Tasks, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. bug
    Edit...
  2. enhancement
    Edit...
  3. Implement head [n]
    Options
  4. Implement taste [n]
    Options
  5. Unit or integration tests
    Options
  6. Documentation
    Options

The `head [n]` operator limits the result to the first `n` events. The
limit defaults to 1.

The `taste [n]` operator behaves similarly, except that the limit is
applied per unique schema. E.g., running `vast export json 'taste'` will
return exactly one event of schema in the database.
@dominiklohmann dominiklohmann added the feature New functionality label Jan 29, 2023
@dominiklohmann dominiklohmann marked this pull request as ready for review January 30, 2023 10:59
mavam
mavam previously requested changes Jan 30, 2023
Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

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

We need N = 10 as default to match the users' expectation from other tools.

web/docs/understand/query-language/operators/head.md Outdated Show resolved Hide resolved
web/docs/understand/query-language/operators/taste.md Outdated Show resolved Hide resolved
Copy link
Member

@Dakostu Dakostu left a comment

Choose a reason for hiding this comment

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

I looked into the code and played around with the operators a bit and I don't see any (big) problems. So it's an approval from me. I did leave some comments though. Good luck with the demo!

web/docs/understand/query-language/operators/taste.md Outdated Show resolved Hide resolved
libvast/test/pipeline.cpp Show resolved Hide resolved
Base automatically changed from topic/preserve-import-time to master January 30, 2023 14:19
@dominiklohmann dominiklohmann merged commit f6407cc into master Jan 30, 2023
@dominiklohmann dominiklohmann deleted the topic/taste-and-head branch January 30, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
3 participants