Conversation
Looks like your code doesn't compile with no-std? https://github.com/sqlparser-rs/sqlparser-rs/actions/runs/4928867591/jobs/8807772910?pr=874
Adding a keyword should work (they are not automatically reserved) |
I think I can solve that one; but https://github.com/sqlparser-rs/sqlparser-rs/actions/runs/4928867591/jobs/8807773893?pr=874#step:5:504 needs some crate-specific guidance... |
|
It looks like the new test you wrote is failing, and it reproduces locally with: Can you be more specific about what kind of guidance you need? |
|
I'm fine reproducing the test. But I'm not sure what the best test for this is — is it Any thoughts why the test is failing? It looks like it's expecting the expression to finish after |
|
OK, one reason is that it never gets to diff --git a/src/dialect/mysql.rs b/src/dialect/mysql.rs
index 9e82702..62d2624 100644
--- a/src/dialect/mysql.rs
+++ b/src/dialect/mysql.rs
@@ -49,6 +49,7 @@ fn parse_infix(
_expr: &crate::ast::Expr,
_precedence: u8,
) -> Option<Result<crate::ast::Expr, crate::parser::ParserError>> {
+ panic!();
// Parse REGEXP as an operator
if _parser.parse_keyword(Keyword::REGEXP) {
Some(Ok(Expr::BinaryOp {
...so this would benefit from some guidance from someone who knows this — thank you |
|
Have you verified that the change works outside of the test? |
I'm not particularly familiar with this code, but it looks like you need to set a precedence in |
Perfect, thanks! This is working on my end now; let's see whether CI passes |
Pull Request Test Coverage Report for Build 4932692393
💛 - Coveralls |
|
I feel like #868 is a better (simpler) approach -- given that do we still want to try and push this one forward? |
I'm totally fine with #868! Tbh I was doing this to be a good citizen, as we're such heavy users of sqlparser-rs, rather than needing it per-se. I could understand wanting either approach — you might want to actually parse the |
Thank you for the kind works and the sense of civic responsibility ❤️ |
|
I believe #868 has superseded this PR |
Would replace #868
But couple of issues:
REGEXPbe a keyword? If not, what would we parse?