niebayes opened a new issue, #1995: URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1995
Our database system is currently implementing an Optimizer Hints feature similar to MySQL's implementation, using the following syntax: ```sql SELECT /*+ SET_VAR(target_partitions=1) */ * FROM (SELECT /*+ SET_VAR(target_partitions=8) */ * FROM t1 LIMIT 1) AS dt; ``` In this example, we can identify two distinct query blocks: - The inner subquery block - The outer main query block However, we're facing a technical challenge that the current sqlparser library: - Automatically ignores all multi-line comments (including our hint syntax) - Does not preserve or expose these comments in the parsed statement structure These limitations makes us cannot reliably associate optimizer hints with their corresponding query blocks, which makes it impossible to configure query parameters for each query block solely. -- 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.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