Skip to content

Commit

Permalink
remove unescaper crate
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonnnli committed Feb 21, 2024
1 parent a7c0523 commit d500eb3
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 59 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ sqlparser = { version = "0.43.0", features = ["visitor"] }
tempfile = "3"
thiserror = "1.0.44"
tokio = { version = "1.36", features = ["macros", "rt", "sync"] }
unescaper = "0.1.4"
url = "2.2"

[profile.release]
Expand Down
86 changes: 33 additions & 53 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion datafusion/sql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ datafusion-common = { workspace = true }
datafusion-expr = { workspace = true }
log = { workspace = true }
sqlparser = { workspace = true }
unescaper = { workspace = true }

[dev-dependencies]
ctor = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions datafusion/sql/src/expr/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
plan_err!("Invalid HexStringLiteral '{s}'")
}
}
Value::EscapedStringLiteral(s) => match unescaper::unescape(&s) {
Ok(s) => Ok(lit(s)),
Err(_) => plan_err!("Invalid EscapedStringLiteral '{s}'"),
Value::EscapedStringLiteral(s) => match crate::utils::unescape(&s) {
Some(s) => Ok(lit(s)),
None => plan_err!("Invalid EscapedStringLiteral '{s}'"),
},
_ => plan_err!("Unsupported Value '{value:?}'"),
}
Expand Down
Loading

0 comments on commit d500eb3

Please sign in to comment.