Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0b03851
Init
Bill-hbrhbr Aug 27, 2026
dbc1986
Change search to query; Add msgpack tests
Bill-hbrhbr Aug 27, 2026
d8f992e
Merge branch 'main' into query-coordinator-tdl
Bill-hbrhbr Aug 27, 2026
0ba6fe5
docs(clp-tdl-package): Clarify package task scope
Bill-hbrhbr Aug 27, 2026
1198719
Merge branch 'main' into query-coordinator-tdl
Bill-hbrhbr Aug 28, 2026
6298f54
polish
Bill-hbrhbr Aug 28, 2026
ff5bc49
Update components/clp-rust-utils/src/task_io/query.rs
Bill-hbrhbr Aug 29, 2026
37396cd
Update components/clp-rust-utils/src/task_io/query.rs
Bill-hbrhbr Aug 29, 2026
da02988
Change to milliseconds
Bill-hbrhbr Aug 30, 2026
bf2ebc0
Update components/clp-tdl-package/src/task/query/mod.rs
Bill-hbrhbr Aug 30, 2026
ba425f5
Merge branch 'main' into query-coordinator-tdl
Bill-hbrhbr Aug 30, 2026
0296f0c
Remove task redundant description
Bill-hbrhbr Aug 31, 2026
2096e9b
Add query job ID type
Bill-hbrhbr Aug 31, 2026
cb87c6e
Make query task dataset optional
Bill-hbrhbr Aug 31, 2026
f8a68a6
Require non-empty query task strings
Bill-hbrhbr Aug 31, 2026
d5c0450
Use shared default for query result limit
Bill-hbrhbr Aug 31, 2026
ca2ebe2
Lint fix remove unused
Bill-hbrhbr Aug 31, 2026
9429396
Remove unused query task output
Bill-hbrhbr Aug 31, 2026
323acfc
Rename task
Bill-hbrhbr Aug 31, 2026
8f509ef
Add query task output handle
Bill-hbrhbr Aug 31, 2026
b67cb70
Fix todo uppercase
Bill-hbrhbr Aug 31, 2026
61fd27e
Merge branch 'main' into query-coordinator-tdl
Bill-hbrhbr Aug 31, 2026
3bee52b
Document Python mirror for query result limit default
Bill-hbrhbr Aug 31, 2026
c39b086
Name query task output handle parameter after its type
Bill-hbrhbr Sep 1, 2026
3cee914
Fix symbol ordering
Bill-hbrhbr Sep 1, 2026
789f671
Use clp-s default query result limit
Bill-hbrhbr Sep 1, 2026
184d940
Apply batched suggestions from code review
Bill-hbrhbr Sep 1, 2026
c479fad
Propagate rename
Bill-hbrhbr Sep 1, 2026
cfa0a97
lint fix
Bill-hbrhbr Sep 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/clp-rust-utils/src/job_config/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use serde::Serialize;

pub const QUERY_JOBS_TABLE_NAME: &str = "query_jobs";

pub type QueryJobId = i32;

/// Mirror of `job_orchestration.scheduler.job_config.AggregationConfig`. Must be kept in sync.
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[serde(default)]
Expand Down
1 change: 1 addition & 0 deletions components/clp-rust-utils/src/task_io.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pub mod compression;
pub mod query;
34 changes: 34 additions & 0 deletions components/clp-rust-utils/src/task_io/query.rs
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>,

Comment thread
coderabbitai[bot] marked this conversation as resolved.
/// 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,
}
Comment thread
Bill-hbrhbr marked this conversation as resolved.
Outdated
8 changes: 6 additions & 2 deletions components/clp-tdl-package/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Spider TDL task package `clp`: the CLP compression tasks the Spider task executor loads.
//! Spider TDL package `clp`, providing CLP compression and query tasks for Spider task executors.

pub mod common;
mod task;
Expand Down Expand Up @@ -28,5 +28,9 @@ fn package_init() -> Result<(), TdlError> {
spider_tdl::register_tdl_package! {
package_name: "clp",
init: package_init,
tasks: [task::compression::s3_compress_task, task::compression::commit_task],
tasks: [
task::compression::s3_compress_task,
task::compression::commit_task,
task::query::clp_s_search_task,
],
}
1 change: 1 addition & 0 deletions components/clp-tdl-package/src/task/mod.rs
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;
20 changes: 20 additions & 0 deletions components/clp-tdl-package/src/task/query/mod.rs
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")
Comment thread
Bill-hbrhbr marked this conversation as resolved.
Outdated
}
Loading