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 case of dictionary column as path for JSON lookup #58

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

davidhewitt
Copy link
Collaborator

Fixes #53

The logic was wrong; we were pulling out the dictionary values and then zipping on that, which was just mixing up data and generally incorrect.

@davidhewitt davidhewitt changed the title Dh/array key bug fix case of dictionary column as path for JSON lookup Nov 25, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 61.53846% with 10 lines in your changes missing coverage. Please review.

Project coverage is 84.08%. Comparing base (6fae049) to head (f048e37).

Files with missing lines Patch % Lines
src/common.rs 61.53% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
- Coverage   84.69%   84.08%   -0.62%     
==========================================
  Files          15       15              
  Lines         980      980              
  Branches      980      980              
==========================================
- Hits          830      824       -6     
- Misses        103      109       +6     
  Partials       47       47              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -96,7 +96,11 @@ async fn create_test_table(large_utf8: bool, dict_encoded: bool) -> Result<Sessi
Arc::new(Schema::new(vec![
Field::new("json_data", DataType::Utf8, false),
Field::new("str_key1", DataType::Utf8, false),
Field::new("str_key2", DataType::Utf8, false),
Field::new(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With this change to the test suite and not the corresponding changes to common.rs, the issue in #53 reproduced as part of the suite.

Copy link
Collaborator

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

Honestly, this is beyond my capacity to review right now, but I trust you.

@davidhewitt davidhewitt merged commit 9d72f5d into main Nov 28, 2024
7 checks passed
@davidhewitt davidhewitt deleted the dh/array-key-bug branch November 28, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error raised while using a column as a JSON access key
3 participants