pub struct WindowFunctionPlanner;Expand description
Window function plan generator
Implementations§
Source§impl WindowFunctionPlanner
impl WindowFunctionPlanner
Sourcepub fn plan(
query: &Value,
metadata: &FactTableMetadata,
) -> Result<WindowExecutionPlan>
pub fn plan( query: &Value, metadata: &FactTableMetadata, ) -> Result<WindowExecutionPlan>
Generate window function execution plan from JSON query
§Example Query Format
{
"table": "tf_sales",
"select": ["revenue", "category"],
"windows": [
{
"function": {"type": "row_number"},
"alias": "rank",
"partitionBy": ["data->>'category'"],
"orderBy": [{"field": "revenue", "direction": "DESC"}]
}
],
"limit": 10
}§Errors
Returns FraiseQLError::Validation if the window function specification is invalid
(e.g., missing required fields, disallowed characters, or unsupported function names).
Sourcepub fn validate(
plan: &WindowExecutionPlan,
_metadata: &FactTableMetadata,
database_target: DatabaseType,
) -> Result<()>
pub fn validate( plan: &WindowExecutionPlan, _metadata: &FactTableMetadata, database_target: DatabaseType, ) -> Result<()>
Validate window function plan
§Errors
Returns FraiseQLError::Validation if the plan uses features unsupported by the
target database (e.g., RANGE frames on MySQL/SQLite).
Auto Trait Implementations§
impl Freeze for WindowFunctionPlanner
impl RefUnwindSafe for WindowFunctionPlanner
impl Send for WindowFunctionPlanner
impl Sync for WindowFunctionPlanner
impl Unpin for WindowFunctionPlanner
impl UnsafeUnpin for WindowFunctionPlanner
impl UnwindSafe for WindowFunctionPlanner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more