MCPcopy Create free account
hub / github.com/apache/datafusion / output_ordering

Method output_ordering

datafusion/functions/src/datetime/date_bin.rs:267–282  ·  view source on GitHub ↗
(&self, input: &[ExprProperties])

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
eqMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected