8000 fix(sql): preserve literals when rewriting backtick identifiers by eddiethedean · Pull Request #25 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

fix(sql): preserve literals when rewriting backtick identifiers - #25

Merged
dmux merged 5 commits into
dmux:mainfrom
eddiethedean:fix/sql-backtick-literals
Oct 20, 2026
Merged

dmux merged 5 commits into
dmux:mainfrom
eddiethedean:fix/sql-backtick-literals

Conversation

@eddiethedean
@eddiethedean eddiethedean commented Oct 19, 2026 •
Copy link
Copy Markdown
Collaborator

Backticks inside SQL string values were being rewritten to double quotes, silently changing query results. For example:

SELECT '`hello`' AS `value`;

This now returns the literal backticks unchanged. Backticks in comments and escaped identifier names also preserve their intended behavior.

Replace the global substitution with a scanner that preserves ordinary, E-prefixed, and dollar-quoted strings, existing quoted identifiers, and nested comments. Translate doubled backticks and embedded double quotes correctly. Match DuckDB's Unicode identifier and whitespace rules for typed literals, string continuations, and dollar tags. Statements without backticks return immediately, avoiding unnecessary scanning. Regression coverage uses the real Databricks SDK: 27 parametrized cases plus a typed-literal test.

Validation at c0f3916:

  • Full rebuilt Docker suite: 406 passed, 36 warnings, using DuckDB 1.5.6.
  • uv run pre-commit run --all-files and git diff --check passed.
  • UI checks on Node 24 with pinned pnpm: lint, typecheck, 32 unit tests, and production/static-export build passed. Lint reported one warning in the unchanged ui/src/components/results/results-grid.tsx (react-hooks/incompatible-library).

To reproduce the full suite:

docker compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from test-runner
docker compose -f docker-compose.test.yml down -v

Maintainer handoff: this PR is open and ready for review, has no merge conflicts or unresolved review threads, and allows maintainer edits. GitHub currently reports merging as BLOCKED and publishes no CI checks for this head. A repository maintainer needs to confirm CI/workflow approval and any merge requirements before merging; the blocking reason is not visible with contributor read access. Compatibility across every supported DuckDB version has not been exercised.

@dmux
dmux commented Oct 20, 2026
Copy link
Copy Markdown
Owner

@eddiethedean, thank you for your contribution, we will make it available in the next release on October 23rd.

@dmux dmux 9AAD self-assigned this Oct 20, 2026
@dmux dmux added the bug Something isn't working label Oct 20, 2026
@dmux
dmux merged commit bc18497 into dmux:main Oct 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0