-
Notifications
You must be signed in to change notification settings - Fork 575
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
feat(parser): make json parser case insensitive #7256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
writer.insert(|column| { | ||
cannal_simd_json_parse_value( | ||
&column.data_type, | ||
v.get(column.name.as_str()), | ||
get_column_from_value( | ||
column.name.to_lowercase().as_str(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about passing the original value and using eq_ignore_ascii_case
to reduce an allocation? I guess the optimization makes sense here because it's likely in the critical path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, to validate these choices, perhaps we should run the microbenchmark? https://github.com/risingwavelabs/risingwave/blob/main/src/source/benches/json_parser.rs
…ingularity-data/risingwave into tab/source-column-to-lowercase
Signed-off-by: tabVersion <tabvision@bupt.icu>
This reverts commit 63ea4a5.
This reverts commit 600acc1.
This reverts commit 56536d4.
impl a new feature in simd-json to change all keys to lowercase when deserializing |
Codecov Report
@@ Coverage Diff @@
## main #7256 +/- ##
=======================================
Coverage 72.98% 72.98%
=======================================
Files 1065 1065
Lines 170128 170152 +24
=======================================
+ Hits 124163 124183 +20
- Misses 45965 45969 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
resolve #7228 |
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
This section will be used as the commit message. Please do not leave this empty!
Please explain IN DETAIL what the changes are in this PR and why they are needed:
Checklist
- [ ] I have written necessary rustdoc comments./risedev check
(or alias,./risedev c
)Documentation
Release note
as describe above
Refer to a related PR or issue link (optional)
None