Skip to content

Escape bytes parameters as strings, not as ARRAY of ints - #959

Open
Shubham-Padkonde wants to merge 1 commit into
databricks:mainfrom
Shubham-Padkonde:fix/escape-bytes-as-string
Open

Shubham-Padkonde wants to merge 1 commit into
databricks:mainfrom
Shubham-Padkonde:fix/escape-bytes-as-string

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

With inline parameters, ParamEscaper.escape_item checked for Sequence before bytes. Since bytes is a Sequence, a bytes value was escaped element by element (b"hi" became ARRAY(104,105)), and the bytes handling in escape_string, which decodes UTF-8 for older SQLAlchemy, was never reached. Route bytes to escape_string.

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Other

Description

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually
  • N/A

Related Tickets & Documents

With inline parameters, ParamEscaper.escape_item checked for Sequence
before bytes. Since bytes is a Sequence, a bytes value was escaped
element by element (b"hi" became ARRAY(104,105)), and the bytes
handling in escape_string, which decodes UTF-8 for older SQLAlchemy,
was never reached. Route bytes to escape_string.

Signed-off-by: Shubham Padkonde <shubhampadkonde12@gmail.com>
Copilot AI lite review requested due to automatic review settings September 25, 2026 15:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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.

2 participants