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

Method not

datafusion/expr/src/operation.rs:128–171  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

126 type Output = Self;
127
128 fn not(self) -> Self::Output {
129 match self {
130 Expr::Like(Like {
131 negated,
132 expr,
133 pattern,
134 escape_char,
135 case_insensitive,
136 }) => Expr::Like(Like::new(
137 !negated,
138 expr,
139 pattern,
140 escape_char,
141 case_insensitive,
142 )),
143 Expr::SimilarTo(Like {
144 negated,
145 expr,
146 pattern,
147 escape_char,
148 case_insensitive,
149 }) => Expr::SimilarTo(Like::new(
150 !negated,
151 expr,
152 pattern,
153 escape_char,
154 case_insensitive,
155 )),
156 Expr::InList(InList {
157 expr,
158 list,
159 negated,
160 }) => Expr::InList(InList::new(expr, list, !negated)),
161 Expr::Exists(Exists { subquery, negated }) => {
162 Expr::Exists(Exists::new(subquery, !negated))
163 }
164 Expr::InSubquery(InSubquery {
165 expr,
166 subquery,
167 negated,
168 }) => Expr::InSubquery(InSubquery::new(expr, subquery, !negated)),
169 _ => Expr::Not(Box::new(self)),
170 }
171 }
172}
173
174#[cfg(test)]

Callers 2

evaluate_boundsMethod · 0.45
notFunction · 0.45

Calls 6

LikeClass · 0.85
newFunction · 0.85
InListClass · 0.85
ExistsClass · 0.85
InSubqueryClass · 0.85
NotClass · 0.85

Tested by

no test coverage detected