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

Method build

datafusion/functions-aggregate/src/string_agg.rs:723–741  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

721 }
722
723 fn build(&self) -> Result<Box<dyn Accumulator>> {
724 StringAgg::new().accumulator(AccumulatorArgs {
725 return_field: Field::new("f", DataType::LargeUtf8, true).into(),
726 schema: &self.schema,
727 expr_fields: &[
728 Field::new("col", DataType::LargeUtf8, true).into(),
729 Field::new("lit", DataType::Utf8, false).into(),
730 ],
731 ignore_nulls: false,
732 order_bys: &self.order_bys,
733 is_reversed: false,
734 name: "",
735 is_distinct: self.distinct,
736 exprs: &[
737 Arc::new(Column::new("col", 0)),
738 Arc::new(Literal::new(ScalarValue::Utf8(Some(self.sep.to_string())))),
739 ],
740 })
741 }
742
743 fn build_two(&self) -> Result<(Box<dyn Accumulator>, Box<dyn Accumulator>)> {
744 Ok((self.build()?, self.build()?))

Callers 1

build_twoMethod · 0.45

Calls 4

newFunction · 0.85
accumulatorMethod · 0.45
intoMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected