-
Notifications
You must be signed in to change notification settings - Fork 92
feat(clp-tdl-package): Add task signatures and shared I/O types for non-aggregation queries. #2503
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
Open
Bill-hbrhbr
wants to merge
29
commits into
y-scope:main
Choose a base branch
from
Bill-hbrhbr:query-coordinator-tdl
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
0b03851
Init
Bill-hbrhbr dbc1986
Change search to query; Add msgpack tests
Bill-hbrhbr d8f992e
Merge branch 'main' into query-coordinator-tdl
Bill-hbrhbr 0ba6fe5
docs(clp-tdl-package): Clarify package task scope
Bill-hbrhbr 1198719
Merge branch 'main' into query-coordinator-tdl
Bill-hbrhbr 6298f54
polish
Bill-hbrhbr ff5bc49
Update components/clp-rust-utils/src/task_io/query.rs
Bill-hbrhbr 37396cd
Update components/clp-rust-utils/src/task_io/query.rs
Bill-hbrhbr da02988
Change to milliseconds
Bill-hbrhbr bf2ebc0
Update components/clp-tdl-package/src/task/query/mod.rs
Bill-hbrhbr ba425f5
Merge branch 'main' into query-coordinator-tdl
Bill-hbrhbr 0296f0c
Remove task redundant description
Bill-hbrhbr 2096e9b
Add query job ID type
Bill-hbrhbr cb87c6e
Make query task dataset optional
Bill-hbrhbr f8a68a6
Require non-empty query task strings
Bill-hbrhbr d5c0450
Use shared default for query result limit
Bill-hbrhbr ca2ebe2
Lint fix remove unused
Bill-hbrhbr 9429396
Remove unused query task output
Bill-hbrhbr 323acfc
Rename task
Bill-hbrhbr 8f509ef
Add query task output handle
Bill-hbrhbr b67cb70
Fix todo uppercase
Bill-hbrhbr 61fd27e
Merge branch 'main' into query-coordinator-tdl
Bill-hbrhbr 3bee52b
Document Python mirror for query result limit default
Bill-hbrhbr c39b086
Name query task output handle parameter after its type
Bill-hbrhbr 3cee914
Fix symbol ordering
Bill-hbrhbr 789f671
Use clp-s default query result limit
Bill-hbrhbr 184d940
Apply batched suggestions from code review
Bill-hbrhbr c479fad
Propagate rename
Bill-hbrhbr cfa0a97
lint fix
Bill-hbrhbr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| pub mod compression; | ||
| pub mod query; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| //! Protocol types exchanged with the Spider (Huntsman) tasks that run CLP query jobs. | ||
|
|
||
| use std::num::NonZeroU32; | ||
|
|
||
| use non_empty_string::NonEmptyString; | ||
| use serde::Deserialize; | ||
| use serde::Serialize; | ||
|
|
||
| /// `clp-s` options for a query job. | ||
| #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] | ||
| pub struct ClpSQueryOption { | ||
| /// The query string passed positionally to `clp-s`. | ||
| pub query_string: NonEmptyString, | ||
|
|
||
| /// The per-archive result limit. When absent, the task omits `--max-num-results` and uses the | ||
| /// `clp-s` default. | ||
| pub max_num_results: Option<NonZeroU32>, | ||
|
|
||
| /// Inclusive `--tge` bound in Unix epoch milliseconds. | ||
| pub begin_timestamp_millisecs: Option<i64>, | ||
|
|
||
| /// Inclusive `--tle` bound in Unix epoch milliseconds. | ||
| pub end_timestamp_millisecs: Option<i64>, | ||
|
|
||
| /// Whether `clp-s` performs a case-insensitive search. | ||
| pub ignore_case: bool, | ||
| } | ||
|
|
||
| /// The output handler that `clp-s` writes a query task's results to. | ||
| #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] | ||
| pub enum QueryOutputHandle { | ||
| /// Writes results to the results-cache collection named after the query job's ID. | ||
| ResultsCache, | ||
| } | ||
|
Bill-hbrhbr marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| //! The task implementations this package registers with Spider. | ||
|
|
||
| pub mod compression; | ||
| pub mod query; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| //! The query-task signatures registered with Spider. | ||
|
|
||
| use clp_rust_utils::job_config::QueryJobId; | ||
| use clp_rust_utils::task_io::query::ClpSQueryOption; | ||
| use clp_rust_utils::task_io::query::QueryOutputHandle; | ||
| use non_empty_string::NonEmptyString; | ||
| use spider_tdl::TaskContext; | ||
| use spider_tdl::task; | ||
|
|
||
| #[task(name = "query::clp_s_search")] | ||
| pub(crate) fn clp_s_search_task( | ||
| _ctx: TaskContext, | ||
| _query_job_id: QueryJobId, | ||
| _clp_s_query_option: ClpSQueryOption, | ||
| _dataset: Option<NonEmptyString>, | ||
| _archive_id: NonEmptyString, | ||
| _query_output_handle: QueryOutputHandle, | ||
| ) -> Result<(), spider_tdl::TdlError> { | ||
| todo!("query task is not implemented") | ||
|
Bill-hbrhbr marked this conversation as resolved.
Outdated
|
||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.