(
args: &[Arc<dyn PhysicalExpr>],
index: usize,
)
| 34 | } |
| 35 | |
| 36 | pub(crate) fn get_scalar_value_from_args( |
| 37 | args: &[Arc<dyn PhysicalExpr>], |
| 38 | index: usize, |
| 39 | ) -> Result<Option<ScalarValue>> { |
| 40 | Ok(if let Some(field) = args.get(index) { |
| 41 | let tmp = field |
| 42 | .downcast_ref::<Literal>() |
| 43 | .ok_or_else(|| DataFusionError::NotImplemented( |
| 44 | format!("There is only support Literal types for field at idx: {index} in Window Function"), |
| 45 | ))? |
| 46 | .value() |
| 47 | .clone(); |
| 48 | Some(tmp) |
| 49 | } else { |
| 50 | None |
| 51 | }) |
| 52 | } |
| 53 | |
| 54 | pub(crate) fn get_unsigned_integer(value: &ScalarValue) -> Result<u64> { |
| 55 | if value.is_null() { |
no test coverage detected
searching dependent graphs…