-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Postgres LIKE operators #8894
Conversation
UPDATE: ready for review since the sqlparser PR got merged. |
2500eae
to
f4a7f9c
Compare
ba25339
to
d2717ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gruuya -- this looks great to me. I don't think we should merge this PR with a hard coded pin to the sqlparser repository, but as I mentioned I should have a real release of sqlparser shortly
Cargo.toml
Outdated
@@ -70,7 +70,7 @@ parquet = { version = "50.0.0", default-features = false, features = ["arrow", " | |||
rand = "0.8" | |||
rstest = "0.18.0" | |||
serde_json = "1" | |||
sqlparser = { version = "0.41.0", features = ["visitor"] } | |||
sqlparser = { git = "https://github.com/sqlparser-rs/sqlparser-rs", rev = "c7d2903c6d1d1a98e6e6203c5cfd54acb9aeca16", features = ["visitor"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to wait for sqlparser to be released -- see apache/datafusion-sqlparser-rs#1074 prior to merging this. However I plan to work on releasing sqlparser later today so I think we should be good shortly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that was quick!
I've merged the latest main into this branch now, let me know if there's anything else to do.
@@ -263,6 +263,58 @@ Not Regex Case-Insensitive Match | |||
+---------------------------------------------------+ | |||
``` | |||
|
|||
### `~~` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
#9000 has the sqlparser upgrade |
1de01f2
to
e11a26b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @gruuya
Which issue does this PR close?
Closes #8893.
Rationale for this change
Add support for Postgres
~~
,~~*
,!~~
,!~~*
like-pattern operators, in analogy with the regex-matching operators~
,~*
,!~
,!~*
.What changes are included in this PR?
Extend the
Operator
enum with the new variants, and wire-up evaluation for them.Are these changes tested?
Yes.
Are there any user-facing changes?
New operators available to be used in querying.