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

Method evaluate

datafusion/physical-expr/src/expressions/like.rs:116–125  ·  view source on GitHub ↗
(&self, batch: &RecordBatch)

Source from the content-addressed store, hash-verified

114 }
115
116 fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> {
117 let lhs = self.expr.evaluate(batch)?;
118 let rhs = self.pattern.evaluate(batch)?;
119 match (self.negated, self.case_insensitive) {
120 (false, false) => apply_cmp(Operator::LikeMatch, &lhs, &rhs),
121 (false, true) => apply_cmp(Operator::ILikeMatch, &lhs, &rhs),
122 (true, false) => apply_cmp(Operator::NotLikeMatch, &lhs, &rhs),
123 (true, true) => apply_cmp(Operator::NotILikeMatch, &lhs, &rhs),
124 }
125 }
126
127 fn children(&self) -> Vec<&Arc<dyn PhysicalExpr>> {
128 vec![&self.expr, &self.pattern]

Callers

nothing calls this directly

Calls 1

apply_cmpFunction · 0.85

Tested by

no test coverage detected