kbendick edited a comment on pull request #4396:
URL: https://github.com/apache/iceberg/pull/4396#issuecomment-1080047149


   Explanation of the regex (which was buried in a comment):
   
   The added regex has two parts
   
   1. `/\\*.*?\\*/` is for catching comments of the form /* …. */. We operate 
in (m) multi line mode to be able to catch the case where that comment spans 
multiple lines. The m allows for the . to match on a new line character. The 
(s) for single line mode allows for the ending `*/` to not _have_ to be at the 
end of the line.
   2. `--.*?\\n` is for catching simple SQL comments, that start with two 
dashes and then consume the rest of the line they are on like -- some line 
terminating comment. We operate in (s) single line mode here. We don’t risk 
hitting multi-line mode here really, eg having a comment like that also catch 
the next line, because we explicitly search for the newline character (and 
there’s a test for that case).
   
   All of this is separated by `|`, which acts as the OR.


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