(
&self,
bound: &datafusion_expr::window_frame::WindowFrameBound,
)
| 869 | } |
| 870 | |
| 871 | fn convert_bound( |
| 872 | &self, |
| 873 | bound: &datafusion_expr::window_frame::WindowFrameBound, |
| 874 | ) -> Result<ast::WindowFrameBound> { |
| 875 | match bound { |
| 876 | datafusion_expr::window_frame::WindowFrameBound::Preceding(val) => { |
| 877 | Ok(ast::WindowFrameBound::Preceding({ |
| 878 | let val = self.scalar_to_sql(val)?; |
| 879 | if let ast::Expr::Value(ValueWithSpan { |
| 880 | value: ast::Value::Null, |
| 881 | span: _, |
| 882 | }) = &val |
| 883 | { |
| 884 | None |
| 885 | } else { |
| 886 | Some(Box::new(val)) |
| 887 | } |
| 888 | })) |
| 889 | } |
| 890 | datafusion_expr::window_frame::WindowFrameBound::Following(val) => { |
| 891 | Ok(ast::WindowFrameBound::Following({ |
| 892 | let val = self.scalar_to_sql(val)?; |
| 893 | if let ast::Expr::Value(ValueWithSpan { |
| 894 | value: ast::Value::Null, |
| 895 | span: _, |
| 896 | }) = &val |
| 897 | { |
| 898 | None |
| 899 | } else { |
| 900 | Some(Box::new(val)) |
| 901 | } |
| 902 | })) |
| 903 | } |
| 904 | datafusion_expr::window_frame::WindowFrameBound::CurrentRow => { |
| 905 | Ok(ast::WindowFrameBound::CurrentRow) |
| 906 | } |
| 907 | } |
| 908 | } |
| 909 | |
| 910 | pub(crate) fn function_args_to_sql( |
| 911 | &self, |
no test coverage detected