kbendick opened a new pull request #4396: URL: https://github.com/apache/iceberg/pull/4396
This closes issue https://github.com/apache/iceberg/issues/4289 Currently, We ignore simple comments (those that start with `--`), as well as bracketed comments in our IcebergSqlExtensions ANTLR grammar. However, we have a function `isIcebergCommand`, that checks if a command is an Iceberg command by checking if the string starts with specific phrases that match known Iceberg commands. The sqlText has not yet been passed through the full ANTLR process, so we need to ignore comments manually, akin to ignoring new-lines in https://github.com/apache/iceberg/pull/2729 The driving motivation for this is to allow for DBT support, as DBT adds comments to provide context. There might be a better way to handle this, but this does work for recognizing the Iceberg commands, while still allowing the antlr parser to remove comments, as it has special handling to ensure that SQL hints are _not_ stripped out. For recognizing whether or not something is an Iceberg specific command, we don't care about SQL hints and so can be mroe aggressive in removing comments. -- 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]
