Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Nov 4, 2024
1 parent 99b54be commit 1f13d0d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1474,9 +1474,11 @@ impl<'a, S: SimplifyInfo> TreeNodeRewriter for Simplifier<'a, S> {
if let Expr::Literal(ScalarValue::Utf8(Some(pattern_str))) =
like_expr.pattern.as_ref()
{
if !pattern_str.contains(['%', '_'].as_ref()) && like_expr.escape_char.is_none() {
if !pattern_str.contains(['%', '_'].as_ref())
&& like_expr.escape_char.is_none()
{
// If the pattern does not contain any wildcards, we can simplify the like expression to an equality expression

// TODO: handle escape characters
// These currently aren't anywhere else in DataFusion

Expand Down

0 comments on commit 1f13d0d

Please sign in to comment.