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

chore: Remove redundant processing from exprToProtoInternal #1351

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

andygrove
Copy link
Member

Which issue does this PR close?

N/A

Rationale for this change

We have two very similar methods, exprToProto and exprToProtoInternal.

exprToProto performs a transformation on the expression tree to handle decimal promotion and then calls into the recursive method exprToProtoInternal to perform the translation to protobuf.

Within exprToProtoInternal we should only recurse into exprToProtoInternal but in some cases we were calling exprToProto instead,. This was not harmful but is performing redundant work.

What changes are included in this PR?

  • Improve documentation
  • Replace calls to exprToProto with exprToProtoInternal within exprToProtoInternal

How are these changes tested?

@andygrove andygrove changed the title Remove redundant processing from exprToProtoInternal chore: Remove redundant processing from exprToProtoInternal Jan 29, 2025
@andygrove andygrove marked this pull request as ready for review January 29, 2025 15:44
@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.16%. Comparing base (f09f8af) to head (532fdbc).
Report is 17 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##               main    #1351       +/-   ##
=============================================
- Coverage     56.12%   39.16%   -16.96%     
- Complexity      976     2065     +1089     
=============================================
  Files           119      262      +143     
  Lines         11743    60323    +48580     
  Branches       2251    12836    +10585     
=============================================
+ Hits           6591    23627    +17036     
- Misses         4012    32223    +28211     
- Partials       1140     4473     +3333     

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

Copy link
Contributor

@parthchandra parthchandra left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @andygrove

@andygrove andygrove merged commit 6cf140f into apache:main Feb 4, 2025
74 checks passed
@andygrove andygrove deleted the expr-to-proto-internal branch February 4, 2025 16:59
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