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": {"row_number": {}},
"alias": "rank",
"partitionBy": ["data->>'category'"],
"orderBy": [{"field": "revenue", "direction": "DESC"}]
}
],
"limit": 10
}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
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