Skip to content

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

Merged
philo-he merged 2 commits intoapache:mainfrom
philo-he:disable-simdjson-utf-8-validation
Aug 7, 2024
Merged

[VL] Skip UTF-8 validation in JSON parsing#6661
philo-he merged 2 commits intoapache:mainfrom
philo-he:disable-simdjson-utf-8-validation

Conversation

@philo-he
Copy link
Copy Markdown
Member

@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.

@github-actions
Copy link
Copy Markdown

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
Copy Markdown
Member 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
Copy Markdown
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
Copy Markdown
Contributor

@philo-he Thanks. Just keep it consistent with Spark.

@philo-he
Copy link
Copy Markdown
Member 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
Copy Markdown
Member 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
Copy Markdown
Contributor

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

before

Ef0s04FRjz

now

X6ORFcrcNI

@philo-he
Copy link
Copy Markdown
Member Author

philo-he commented Aug 7, 2024

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

Copy link
Copy Markdown
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
@kecookier
Copy link
Copy Markdown
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 <feilong.he@intel.com>
Co-authored-by: Arnav Balyan <60175178+ArnavBalyan@users.noreply.github.com>
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