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

   A DuckDB macro without arguments lost its parentheses on display: `CREATE 
MACRO four() AS 4` was printed as `CREATE MACRO four AS 4`, which DuckDB 
rejects with a syntax error at `AS`. DuckDB's `CREATE MACRO` reference requires 
parentheses after the macro name even when there are no parameters 
(https://duckdb.org/docs/current/sql/statements/create_macro).
   
   The parser stores an empty argument list as `None`, and the display now 
prints `()` in that case. Tests cover DuckDB and the generic dialect, including 
DuckDB's `CREATE FUNCTION` spelling of a macro.


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