| 265 | } |
| 266 | |
| 267 | fn output_ordering(&self, input: &[ExprProperties]) -> Result<SortProperties> { |
| 268 | // The DATE_BIN function preserves the order of its second argument. |
| 269 | let step = &input[0]; |
| 270 | let date_value = &input[1]; |
| 271 | let reference = input.get(2); |
| 272 | |
| 273 | if step.sort_properties.eq(&SortProperties::Singleton) |
| 274 | && reference |
| 275 | .map(|r| r.sort_properties.eq(&SortProperties::Singleton)) |
| 276 | .unwrap_or(true) |
| 277 | { |
| 278 | Ok(date_value.sort_properties) |
| 279 | } else { |
| 280 | Ok(SortProperties::Unordered) |
| 281 | } |
| 282 | } |
| 283 | fn documentation(&self) -> Option<&Documentation> { |
| 284 | self.doc() |
| 285 | } |