eyalleshem commented on issue #2036: URL: https://github.com/apache/datafusion-sqlparser-rs/issues/2036#issuecomment-3448836563
I started working on this (you can see the first step in [#2073](https://github.com/apache/datafusion-sqlparser-rs/pull/2073)), and one of the issues I encountered is that in some places in the Tokenizer, we're modifying the raw string (I can see this happening in the escaping function, and possibly in other places as well). Since this PR already suggests using Cow, my suggestion is that when we try to Tokenize such elements, we should also use the Cow strategy. When a string is manipulated, we would create a new string and use Cow::Owned, and when it's not manipulated, we would use the Cow::Borrowed version. (I'm making an assumption here that in most cases we don't manipulate the string - for example, in the escaping case, I assume that most strings will not be escaped by the Tokenizer.) -- 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]
