iffyio commented on code in PR #2480:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2480#discussion_r3946592642
##########
src/dialect/redshift.rs:
##########
@@ -35,6 +41,28 @@ pub struct RedshiftSqlDialect {}
// in the Postgres dialect, the query will be parsed as an array, while in the
Redshift dialect it will
// be a json path
impl Dialect for RedshiftSqlDialect {
+ fn parse_prefix(&self, parser: &mut Parser) -> Option<Result<Expr,
ParserError>> {
+ if matches!(&parser.peek_token_ref().token, Token::Word(word) if
word.value.eq_ignore_ascii_case("approximate"))
Review Comment:
hmm this doesnt look like the correct place for this functionality, we
already have function parsers in the parser and support other percentile_disc
variants. so that I think we likely just need to adjust that logic to accept
redshifts' syntax
--
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]