villebro commented on pull request #17419: URL: https://github.com/apache/superset/pull/17419#issuecomment-967795129
Thanks for the review @john-bodley, good comments to my oversights! > LGTM, with one non-blocking comment. Its somewhat strange that we need to handle this logic, i.e., blindly I would have assumed that SQLAlchemy would deal with the escaping. AFAIK, currently there is no way of indicating that the clause is literal (like `literal_column`, for instance). Hence colons need to be escaped to indicate to SQLAlchemy that they should not be made available as bind parameters during compilation. But I'm going to propose adding `is_literal` to the `text()` factory, and then adding a `literal_text` factory as shorthand to match (`literal_column`), as I've seen multiple other people ask for the same thing elsewhere (in all the posts I've found, the author of SQLAlchemy always recommends just escaping the bind-like parameters). -- 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]
