Allow implicit escape for _ but not % in JDBC metadata calls#12672
Allow implicit escape for _ but not % in JDBC metadata calls#12672findepi merged 2 commits intotrinodb:masterfrom
Conversation
|
I'm not sure I understand the issue. Should we be escaping the values at all? Is Tableau aware they're using the driver incorrectly? |
Sounds like you shouldn't use Does it mean that Tableau uses percent woldcards in some queries, with also doing literal searches (with no escaping) in other queries? |
I haven't reported it yet, but we have no impact on their timelines.
Correct, it's sort of mixed behaviour in Tableau. |
Yes, from the queries @hovaesco shared offline that seemed to be the case. The queries for listing schemas and table don't escape wildcards properly. The queries for listing columns does it properly. A single toggle won't work for Tableau. This change would make column listing faster but might make other queries using the |
|
I think the table names rarely contain OTOH, Maybe we should rename it to or introduce |
6960df4 to
fcf1919
Compare
|
I changed parameter name to The reasoning behind it is that the change was originally done for Tableau and having |
|
sorry for not being explicit
after second thought i think we need a deprecation period for the old config
|
i understand the timeline problem, so i think we should continue the work here. has the bug been reported to Tableau already? |
|
Agree on suggested steps. I'm going to adjust PR accordingly. The plan is to report the bug to Tableau and wait for their fix once we have a working solution here. |
fcf1919 to
70e76e0
Compare
|
Added a new parameter |
70e76e0 to
5310b34
Compare
There was a problem hiding this comment.
Split changes into two commits
- that adds more whitespace to this table (and no other changes)
- second adds the new property and deprecates the old one
Add a new paramater assumeLiteralUnderscoreInMetadataCallsForNonConformingClients to JDBC driver.
5310b34 to
cef33e4
Compare
Description
Setting
assumeLiteralNamesInMetadataCallsForNonConformingClients=truehighly improves performance of metadata retrieval in Tableau. However while loading a table to Tableau a following query is being issued which results in no rows returned cause it tries to find a wildcard character in column nameCOLUMN_NAME LIKE '\%' ESCAPE '\', it turns the query into a search for columns that literally have%in them. This PR introduces a new parameter assumeLiteralUnderscoreInMetadataCallsForNonConformingClients to JDBC driver which fixes the issue by not escaping%.new feature/improvement
jdbc
Related issues, pull requests, and links
Documentation
( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
( ) Release notes entries required with the following suggested text: