Skip to content

Conversation

@adriangb
Copy link
Collaborator

@adriangb adriangb commented Feb 6, 2025

This takes us from attributes -> Utf8(\"foo\") to attributes -> foo

This takes us from `attributes -> Utf8(\"foo\")` to `attributes -> foo`
@adriangb adriangb requested a review from davidhewitt February 6, 2025 03:55
@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 82.67%. Comparing base (2fffb96) to head (f28f944).

Files with missing lines Patch % Lines
src/rewrite.rs 75.00% 9 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   83.02%   82.67%   -0.36%     
==========================================
  Files          15       15              
  Lines        1143     1183      +40     
  Branches     1143     1183      +40     
==========================================
+ Hits          949      978      +29     
- Misses        132      141       +9     
- Partials       62       64       +2     

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

Comment on lines 102 to 123
#[derive(Debug, Clone, Copy)]
enum JsonOperator {
Arrow,
LongArrow,
Question,
}

impl TryFrom<&BinaryOperator> for JsonOperator {
type Error = DataFusionError;

fn try_from(op: &BinaryOperator) -> Result<Self> {
match op {
BinaryOperator::Arrow => Ok(JsonOperator::Arrow),
BinaryOperator::LongArrow => Ok(JsonOperator::LongArrow),
BinaryOperator::Question => Ok(JsonOperator::Question),
_ => Err(DataFusionError::Internal(format!(
"Unexpected operator {:?} in JSON function rewriter",
op
))),
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like the Error is never really used, so let's just make it trivial.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yup was about to push that 🧠

@adriangb adriangb enabled auto-merge (squash) February 6, 2025 16:04
@adriangb adriangb merged commit 149eca7 into main Feb 6, 2025
7 checks passed
@adriangb adriangb deleted the fix branch February 6, 2025 16:04
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.

4 participants