Repository navigation
Conversation
Escape quotes and backticks in the string quoting helpers and add regression tests.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 5d6792e. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| /// <summary> | ||
| /// Encloses column name in backticks (`). Escapes ` symbol if met inside name | ||
| /// Does nothing if column is already enclosed | ||
| /// The input is always treated as an unquoted column name. |
There was a problem hiding this comment.
❌ Blocker: Document the breaking column-name contract
This changes the public InsertBinaryAsync(..., columns, ...) and ClickHouseBulkCopy.ColumnNames contract even though the helper is internal. An element containing the SQL spelling `id` previously selected column id; it now selects a name containing literal backticks. Existing callers therefore fail, or target a different column if both names exist. docs/http.mdx has no update, and the changelog fragment only describes the internal helper. Document the raw-name requirement in the bulk-insert section, show callers replacing previously quoted names with raw names, and record the compatibility change in the changelog. Also state that each collection element is one name.
A reply here is read on the next review: an explanation that holds up drops the finding.
|
Summary ❌ Blockers
Tests
Missing context
Final verdict❌ Block. Complete backslash escaping and document the public column-name contract change. Automated review by Polyglot AI (gpt-6-astra) of |
polyglotAI-bot
left a comment
There was a problem hiding this comment.
Review of d01d8ba posted: see the summary comment and the inline threads.
Escape backslashes before backticks in `EncloseColumnName`, add schema-integration coverage for raw names containing `\` before `` ` ``, and clarify insert column name documentation.

Summary
Fixes
EncloseColumnNamereturning already-delimited input without escaping embedded backticks.The method now treats the input as an unquoted column name, escapes backticks inside it, and adds the enclosing backticks.
QuoteSingleandQuoteDoublecontinue to add delimiters without escaping their input, preserving the existingEscape().QuoteSingle()production flow and avoiding double-escaping.Regression tests were added for embedded and already-delimited backticks, as well as the quote helper behavior.
The existing bulk-copy regression test was corrected to pass each column name as a separate
ColumnNameselement instead of passing two comma-separated identifiers as one value.Fixes #316
Checklist