trungda commented on PR #8918: URL: https://github.com/apache/arrow-datafusion/pull/8918#issuecomment-1901243443
The current implementation is not the best. If the input string is invalid, e.g., unterminated: `select * from tab_1 where col_1 = '`, the whole string will be _un_highlighted. I think a better approach is to make change to `sqlparser` crate to expose a token iterator just so we can keep highlighting as we scan through the original string, and only stop when we encounter a failure. Something along this line: https://github.com/sqlparser-rs/sqlparser-rs/blob/main/src/tokenizer.rs#L555-L558. I am happy to go down that path too. Let me know :) -- 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]
