Conversation
This takes us from `attributes -> Utf8(\"foo\")` to `attributes -> foo`
Codecov ReportAttention: Patch coverage is
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. |
davidhewitt
reviewed
Feb 6, 2025
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 | ||
| ))), | ||
| } | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
Looks like the Error is never really used, so let's just make it trivial.
Collaborator
Author
There was a problem hiding this comment.
yup was about to push that 🧠
davidhewitt
approved these changes
Feb 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This takes us from
attributes -> Utf8(\"foo\")toattributes -> foo