xitep commented on code in PR #2115:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2115#discussion_r2598707958
##########
src/dialect/oracle.rs:
##########
@@ -75,6 +82,35 @@ impl Dialect for OracleDialect {
true
}
+ fn get_next_precedence(&self, _parser: &Parser) -> Option<Result<u8,
ParserError>> {
+ let t = _parser.peek_token();
+ debug!("get_next_precedence() {t:?}");
+
+ match t.token {
+ Token::StringConcat =>
Some(Ok(self.prec_value(Precedence::PlusMinus))),
+ _ => None,
+ }
+ }
+
+ fn prec_value(&self, prec: Precedence) -> u8 {
+ match prec {
+ Precedence::Period => 100,
+ Precedence::DoubleColon => 50,
+ Precedence::AtTz => 41,
+ Precedence::MulDivModOp => 40,
+ Precedence::PlusMinus => 30,
+ Precedence::Xor => 24,
+ Precedence::Ampersand => 23,
+ Precedence::Caret => 22,
+ Precedence::Pipe => 21,
+ Precedence::Between | Precedence::Eq | Precedence::Like |
Precedence::Is => 20,
Review Comment:
there's probably no point in overriding this. i'll remove it. oracle [lists
the precedence for these the
same](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/About-SQL-Conditions.html#GUID-65B103FE-C00C-46A3-8173-A731DBF62C80),
but i can't come up with a statement that would involve some of these
intertwined.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]