Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(json_parse): Json_parse to ignore invalid unicode escape sequences #12086

Closed
wants to merge 1 commit into from

Conversation

kgpai
Copy link
Contributor

@kgpai kgpai commented Jan 14, 2025

Summary:
Certain improperly escaped unicode points like \uDE2Dau throw in json_parse. This happens in simdjson since these are invalid unicode escape sequences (i.e without the surrogate pairs). As Presto java ignores this, we add similar support in Velox.

SELECT json_parse(x) from (values '"\uDE2Dau"') t(x);
-- Returns "\uDE2Dau" in java but throws in Velox

Differential Revision: D68176965

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 14, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68176965

Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 11d5659
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/6786e753d7285800083132b5

@kgpai kgpai changed the title Fix(json_parse): Fix json_parse to ignore invalid unicode escape sequences Fix(json_parse): json_parse to ignore invalid unicode escape sequences Jan 14, 2025
@kgpai kgpai changed the title Fix(json_parse): json_parse to ignore invalid unicode escape sequences fix(json_parse): json_parse to ignore invalid unicode escape sequences Jan 14, 2025
Copy link
Contributor

@kevinwilfong kevinwilfong left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kgpai kgpai changed the title fix(json_parse): json_parse to ignore invalid unicode escape sequences fix(json_parse): Json_parse to ignore invalid unicode escape sequences Jan 14, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68176965

…ences (facebookincubator#12086)

Summary:

Certain improperly escaped unicode points like \uDE2Dau throw in json_parse. This happens in simdjson since these are invalid unicode escape sequences (i.e without the surrogate pairs). As Presto java ignores this, we add similar support in Velox. 

```
SELECT json_parse(x) from (values '"\uDE2Dau"') t(x);
-- Returns "\uDE2Dau" in java but throws in Velox
```

Reviewed By: kevinwilfong

Differential Revision: D68176965
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68176965

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 97b64a4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants