fmguerreiro opened a new pull request, #2316:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2316

   ## Summary
   
   Adds PostgreSQL grammar for \`CREATE [OR REPLACE] AGGREGATE\`, including the 
full option set from the PostgreSQL spec 
(https://www.postgresql.org/docs/current/sql-createaggregate.html).
   
   ## What this supports
   
   - \`CREATE AGGREGATE name (arg_type [, ...]) (options)\`
   - \`CREATE OR REPLACE AGGREGATE\`
   - Aggregate options: \`SFUNC\`, \`STYPE\`, \`SSPACE\`, \`FINALFUNC\`, 
\`FINALFUNC_EXTRA\`, \`FINALFUNC_MODIFY\`, \`COMBINEFUNC\`, \`SERIALFUNC\`, 
\`DESERIALFUNC\`, \`INITCOND\`, \`MSFUNC\`, \`MINVFUNC\`, \`MSTYPE\`, 
\`MSSPACE\`, \`MFINALFUNC\`, \`MFINALFUNC_EXTRA\`, \`MFINALFUNC_MODIFY\`, 
\`MINITCOND\`, \`SORTOP\`, \`PARALLEL\`, \`HYPOTHETICAL\`
   - \`FINALFUNC_MODIFY\` / \`MFINALFUNC_MODIFY\` kinds: \`READ_ONLY\`, 
\`SHAREABLE\`, \`READ_WRITE\`
   
   ## Changes
   
   - \`CreateAggregate\` struct plus \`CreateAggregateOption\` and 
\`AggregateModifyKind\` enums in \`src/ast/ddl.rs\` with \`fmt::Display\` + 
\`From<_> for Statement\`.
   - New \`Statement::CreateAggregate\` variant and re-exports.
   - \`Spanned\` arm (\`Span::empty()\` stub — happy to extend with a real span 
if reviewers prefer).
   - \`parse_create_aggregate\` in \`src/parser/mod.rs\`.
   - Three round-trip tests covering the basic form, \`OR REPLACE\` + 
\`PARALLEL\`, and moving-aggregate options.
   
   ## Notes
   
   The final commit (\`fix(spans): add Span::empty() arm for CreateAggregate\`) 
is included in the series; if reviewers prefer a real span implementation 
before merge, happy to replace the stub.
   
   Originally shipped via the \`pgmold-sqlparser\` fork; tested against real 
PostgreSQL 13–17 schemas in [pgmold](https://github.com/fmguerreiro/pgmold).


-- 
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]

Reply via email to