iffyio commented on code in PR #1986: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1986#discussion_r2247654444
########## src/parser/mod.rs: ########## @@ -1248,6 +1248,12 @@ impl<'a> Parser<'a> { debug!("parsing expr"); let mut expr = self.parse_prefix()?; + // We would have exited early in `parse_prefix` before checking for `COLLATE`, and there's + // no infix operator handling for `COLLATE`, so we must return now. + if self.in_column_definition_state() && self.peek_keyword(Keyword::COLLATE) { + return Ok(expr); + } Review Comment: Not sure I followed this requirement here, if we have no infix handling then i would imagine that this shouldn't be needed (we would end up returning the same `expr`)? -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org