quill_sql/plan/logical_plan/limit.rs
1use crate::plan::logical_plan::LogicalPlan;
2use std::sync::Arc;
3
4#[derive(derive_new::new, Debug, Clone)]
5pub struct Limit {
6 pub limit: Option<usize>,
7 pub offset: usize,
8 pub input: Arc<LogicalPlan>,
9}
10
11impl std::fmt::Display for Limit {
12 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13 write!(
14 f,
15 "Limit: {}, offset: {}",
16 self.limit.map_or("None".to_string(), |v| v.to_string()),
17 self.offset
18 )
19 }
20}