Added a fix for BQ connector to correctly treat single quote in query criteria#7869
Added a fix for BQ connector to correctly treat single quote in query criteria#7869ebyhr merged 1 commit intotrinodb:masterfrom ayushbilala:bq-single-quote-bug
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ayush Bilala.
|
There was a problem hiding this comment.
Thanks for sending a PR.
It'd be nice to also handle other possible cases. It can be part of a follow-up if needed.
Please also change the commit message to describe the fix instead of referencing a GitHub issue. You can comment in the PR description as Fixes #7784 instead.
There was a problem hiding this comment.
It'd be nice to handle all possible characters that need escaping.
If possible can you also add support for the ones listed at https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#string_and_bytes_literals along with test-cases?
There was a problem hiding this comment.
Sure, let me take a look and figure out what does it actually take to add escaping for all possible characters.
If it is too much effort, I'll probably take it up as a follow-up.
There was a problem hiding this comment.
@hashhar Adding support for other literals doesn't look straightforward. Is it fine if we go ahead with this one and I'll do some more research and raise a separate issue for other characters?
There was a problem hiding this comment.
Please create an issue with your findings and add a TODO comment here so that we don't forget.
cc: @ebyhr
There was a problem hiding this comment.
Sure, I am on it.
There was a problem hiding this comment.
Created an issue for adding support for all characters #7900.
Added a TODO comment.
.../trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryIntegrationSmokeTest.java
Outdated
Show resolved
Hide resolved
.../trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryIntegrationSmokeTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
@ayushbilala Please squash the commits and amend commit message as suggested by @ebyhr in #7869 (review).
@ebyhr I've verified TestBigQueryIntegrationSmokeTest passes.
|
Merged, thanks! |
Fix for #7784.
Added a change to properly rewrite filter values containing the ANSI SQL single quote Escape sequence into the one that BigQuery is happy with.
Example:
'Looney''s Lane' string in Presto query filter will be changed to 'Looney\'s Lane' in order to make the query work.