Skip to content

fix: treat X'...' as binary literal#19635

Closed
sundy-li wants to merge 1 commit intodatabendlabs:mainfrom
sundy-li:fix-19600-hex-literal
Closed

fix: treat X'...' as binary literal#19635
sundy-li wants to merge 1 commit intodatabendlabs:mainfrom
sundy-li:fix-19600-hex-literal

Conversation

@sundy-li
Copy link
Copy Markdown
Member

@sundy-li sundy-li commented Mar 30, 2026

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Fixes #19600

  • parse SQL-standard X... literals as binary values instead of numeric hex integers\n- keep MySQL-style 0x... literals on the numeric path\n- add parser and SQL regression coverage for binary typing and arithmetic rejection\n\n## Tests\n\n- [x] Unit Test\n- [x] Logic Test\n- [ ] Benchmark Test\n- [ ] No Test - Pair with the reviewer to explain why\n\nValidation run:\n\n- cargo test -p databend-common-ast --test it parser::test_expr\n- cargo check -p databend-common-sql --lib\n- cargo clippy -p databend-common-ast --all-targets -p databend-common-sql --lib -- -D warnings\n\n## Type of change\n\n- [x] Bug fix (non-breaking change which fixes an issue)

This change is Reviewable

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

At least one test kind must be checked in the PR description.
@sundy-li please update it 🙏.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

At least one type of change must be checked in the PR description.
@sundy-li please update it 🙏.

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Mar 30, 2026
@sundy-li sundy-li added the agent-reviewable Ready for agent review label Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🤖 CI Job Analysis

Workflow: 23723389988

📊 Summary

  • Total Jobs: 25
  • Failed Jobs: 2
  • Retryable: 0
  • Code Issues: 2

NO RETRY NEEDED

All failures appear to be code/test issues requiring manual fixes.

🔍 Job Details

  • linux / check: Not retryable (Code/Test)
  • linux / test_unit: Not retryable (Code/Test)

🤖 About

Automated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed).

---------- Input ----------
x'ABC'
---------- Output ---------
error:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

git diff --check flags trailing whitespace on this added line. Please remove the extra space after error: so the branch stays clean.

@sundy-li sundy-li added agent-approved Approved by agent and removed agent-reviewable Ready for agent review labels Mar 30, 2026
@sundy-li sundy-li closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-approved Approved by agent pr-bugfix this PR patches a bug in codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Incorrect implementation of Hex Literal X'...' (Inconsistent with SQL Standard)

1 participant