Skip to content

fix(redshift): handle boolean fields and quoted text in build_json - #94

Merged
bcodell merged 1 commit into
bcodell:mainfrom
redthor:fix/redshift-boolean-quoted-text
May 28, 2026
Merged

fix(redshift): handle boolean fields and quoted text in build_json#94
bcodell merged 1 commit into
bcodell:mainfrom
redthor:fix/redshift-boolean-quoted-text

Conversation

@redthor

@redthor redthor commented May 26, 2026

Copy link
Copy Markdown
Contributor

Redshift's string-concatenation JSON builder had two bugs:

  • Boolean fields cast to varchar yield t/f, not true/false
  • Text fields containing " or \ produce invalid JSON

Fix branches on data_types[feature] type: booleans use CASE WHEN IS TRUE/FALSE, text escapes \ then " via replace().

Closes #90

Redshift's string-concatenation JSON builder had two bugs:
- Boolean fields cast to varchar yield `t`/`f`, not `true`/`false`
- Text fields containing `"` or `\` produce invalid JSON

Fix branches on data_types[feature] type: booleans use CASE WHEN
IS TRUE/FALSE, text escapes `\` then `"` via replace().

Closes bcodell#90

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@bcodell

bcodell commented May 28, 2026

Copy link
Copy Markdown
Owner

@redthor nicely done! I think CI failed due to missing env vars. Given the scope of these changes, and given that we don't have proper CI for redshift (too expensive to maintain a cluster for an OSS project), I'm going to merge and cut a new patch version. Thanks for contributing! Let me know if you run into anything else.

@bcodell
bcodell merged commit abe0d83 into bcodell:main May 28, 2026
1 check failed
@redthor
redthor deleted the fix/redshift-boolean-quoted-text branch May 28, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redshift conversion of boolean and text fields with quote chars

2 participants