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

Method push

datafusion/physical-expr/src/equivalence/class.rs:204–217  ·  view source on GitHub ↗

Insert the expression into this class, meaning it is known to be equal to all other expressions in this class.

(&mut self, expr: Arc<dyn PhysicalExpr>)

Source from the content-addressed store, hash-verified

202 /// Insert the expression into this class, meaning it is known to be equal to
203 /// all other expressions in this class.
204 pub fn push(&mut self, expr: Arc<dyn PhysicalExpr>) {
205 if let Some(lit) = expr.downcast_ref::<Literal>() {
206 let expr_across = AcrossPartitions::Uniform(Some(lit.value().clone()));
207 if let Some(across) = self.constant.as_mut() {
208 // TODO: Return an error if constant values do not agree.
209 if *across == AcrossPartitions::Heterogeneous {
210 *across = expr_across;
211 }
212 } else {
213 self.constant = Some(expr_across);
214 }
215 }
216 self.exprs.insert(expr);
217 }
218
219 /// Inserts all the expressions from other into this class.
220 pub fn extend(&mut self, other: Self) {

Callers 15

split_implFunction · 0.45
mutateMethod · 0.45
test_build_dagFunction · 0.45
get_result_columnMethod · 0.45
evaluateMethod · 0.45
evaluate_statefulMethod · 0.45
run_test_casesFunction · 0.45
add_partial_resultMethod · 0.45
childrenMethod · 0.45

Calls 3

cloneMethod · 0.45
valueMethod · 0.45
insertMethod · 0.45

Tested by 1

test_build_dagFunction · 0.36