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

[VL] Skip UTF-8 validation in JSON parsing #6661

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

PHILO-HE
Copy link
Contributor

@PHILO-HE PHILO-HE commented Jul 31, 2024

What changes were proposed in this pull request?

See discussion: #5253 (comment)

By default, simdjson lib enables UTF-8 validation to check input json string. However, Spark always disregards the UTF-8 encoding invalidity of input.

Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/apache/incubator-gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

@PHILO-HE
Copy link
Contributor Author

@kecookier, do you care about the UTF-8 encoding validity of JSON string? Do we just need to align with Spark's behavior? cc @wang-zhun

@wang-zhun
Copy link
Contributor

@PHILO-HE We don't need UTF-8 validity, we just need to be consistent with Spark.
For example, get_json_object(concat('{"a": "1", "b": "', string(unhex(hex(129))), '"}'), '$.a') compared to Gluten returning null, Spark returning 1 is more in line with our expectations

@kecookier
Copy link
Contributor

@PHILO-HE Thanks. Just keep it consistent with Spark.

@PHILO-HE
Copy link
Contributor Author

PHILO-HE commented Aug 5, 2024

Has opened one thread in velox to discuss this issue: facebookincubator/velox#10639. If velox accepts this change, we can close this pr.

@PHILO-HE PHILO-HE force-pushed the disable-simdjson-utf-8-validation branch from c64d553 to 61d4df4 Compare August 6, 2024 09:10
@github-actions github-actions bot added the VELOX label Aug 6, 2024
@PHILO-HE
Copy link
Contributor Author

PHILO-HE commented Aug 6, 2024

@wang-zhun, can you validate this pr with your cases? We can merge this one if CI passes and no issue is on your side.

@wang-zhun
Copy link
Contributor

@PHILO-HE Thank you, I’ve verified that this patch is effective for my scenario.

before

Ef0s04FRjz

now

X6ORFcrcNI

@PHILO-HE
Copy link
Contributor Author

PHILO-HE commented Aug 7, 2024

@kecookier, could you approve this pr if you have no comment?

Copy link
Contributor

@rui-mo rui-mo left a comment

Choose a reason for hiding this comment

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

Thanks.

@PHILO-HE PHILO-HE merged commit fa12819 into apache:main Aug 7, 2024
42 checks passed
@kecookier
Copy link
Contributor

Thanks.

weiting-chen pushed a commit to weiting-chen/gluten that referenced this pull request Aug 12, 2024
weiting-chen added a commit that referenced this pull request Aug 13, 2024
* [VL] Skip UTF-8 validation in JSON parsing (#6661)

* [VL] Fix high precision rounding (#6707)

---------

Co-authored-by: PHILO-HE <[email protected]>
Co-authored-by: Arnav Balyan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants