You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "yoabot-droid (via GitHub)" <gi...@apache.org> on 2026/02/23 12:17:59 UTC

[PR] MSSQL: support EXEC (@sql) dynamic SQL execution [datafusion-sqlparser-rs]

yoabot-droid opened a new pull request, #2234:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2234

   ## Problem
   
   `EXEC (@sql)` — the T-SQL form for executing a dynamically-built SQL string — was failing to parse. `parse_execute()` was consuming a second parameter list after already parsing the parenthesised name expression, causing parse failures on any token that immediately followed.
   
   ## Fix
   
   Track whether the name expression was itself wrapped in parens. When it is (`EXEC (@sql)`), skip the parameter-list scan so no extra tokens are consumed.
   
   ## Test
   
   Adds `test_exec_dynamic_sql` covering:
   - `EXEC (@sql)` standalone
   - `EXEC (@sql)` followed by another statement on the next line


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org