You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "eric-wang-1990 (via GitHub)" <gi...@apache.org> on 2025/06/11 21:32:32 UTC
[PR] fix(csharp): Enhance pattern wildcard escaping in metadata operations [arrow-adbc]
eric-wang-1990 opened a new pull request, #2960:
URL: https://github.com/apache/arrow-adbc/pull/2960
**Description:**
### Why
Power BI ODBC path do escape both _ and %:
<img width="1317" alt="image" src="https://github.com/user-attachments/assets/e817a86d-595c-4e6c-a6cb-ec4ae1081a3b" />
### Proposed changes
This PR improves the handling of SQL pattern wildcards in metadata operations for C# drivers:
- Renamed `EscapeUnderscore` parameter to `EscapePatternWildcards` to better reflect its purpose
- Enhanced wildcard escaping to handle both underscore (`_`) and percent (`%`) characters
- Updated the parameter description to clarify its functionality
- Fixed a bug in `DatabricksConnection.cs` where default namespace was not being set correctly
### How this was tested
- Updated existing test cases to use the new parameter name
- Manually verified the wildcard escaping functionality works correctly with both underscore and percent sign characters
### Additional context
SQL pattern matching uses underscores (`_`) and percent signs (`%`) as wildcards. When searching for tables or columns that contain these characters literally, they need to be escaped. Previously, we only handled escaping underscores, but this change extends the functionality to handle percent signs as well, providing more complete support for SQL pattern matching.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(csharp/src/Drivers): Enhance pattern wildcard escaping in metadata operations [arrow-adbc]
Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher merged PR #2960:
URL: https://github.com/apache/arrow-adbc/pull/2960
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(csharp/src/Drivers): Enhance pattern wildcard escaping in metadata operations [arrow-adbc]
Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher commented on code in PR #2960:
URL: https://github.com/apache/arrow-adbc/pull/2960#discussion_r2157399233
##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs:
##########
@@ -396,9 +397,9 @@ protected virtual async Task<QueryResult> GetCrossReferenceAsForeignTableAsync(C
null,
null,
null,
- EscapeUnderscoreInName(CatalogName),
- EscapeUnderscoreInName(SchemaName),
- EscapeUnderscoreInName(TableName),
+ (CatalogName),
+ (SchemaName),
+ (TableName),
Review Comment:
Oh, I see in the other PR that this doesn't need wildcards and the parens are removed there. In any event, these would need to be removed to avoid a merge conflict.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(csharp/src/Drivers): Enhance pattern wildcard escaping in metadata operations [arrow-adbc]
Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher commented on code in PR #2960:
URL: https://github.com/apache/arrow-adbc/pull/2960#discussion_r2157395500
##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs:
##########
@@ -396,9 +397,9 @@ protected virtual async Task<QueryResult> GetCrossReferenceAsForeignTableAsync(C
null,
null,
null,
- EscapeUnderscoreInName(CatalogName),
- EscapeUnderscoreInName(SchemaName),
- EscapeUnderscoreInName(TableName),
+ (CatalogName),
+ (SchemaName),
+ (TableName),
Review Comment:
Was this supposed to be changed to `EscapePatternWildcardsInName` or does this Thrift API not work with wild cards? If the latter, then please remove the parens from the arguments.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org