Skip to content

Conversation

@jja725
Copy link
Contributor

@jja725 jja725 commented Dec 16, 2025

Implement proper translation of Cypher arithmetic expressions (+, -, *, /, %) to DataFusion BinaryExpr instead of returning a placeholder lit(0).

Changes:

  • Add full arithmetic operator support in to_df_value_expr()
  • Map ArithmeticOperator variants to DataFusion Operator equivalents
  • Update tests to verify proper BinaryExpr generation with correct operators

Implement proper translation of Cypher arithmetic expressions (+, -, *, /, %)
to DataFusion BinaryExpr instead of returning a placeholder lit(0).

Changes:
- Add full arithmetic operator support in to_df_value_expr()
- Map ArithmeticOperator variants to DataFusion Operator equivalents
- Update tests to verify proper BinaryExpr generation with correct operators
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 87.87879% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...t/lance-graph/src/datafusion_planner/expression.rs 87.87% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@beinan beinan left a comment

Choose a reason for hiding this comment

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

lgtm, but pls fix the format issue, thanks!

@jja725 jja725 marked this pull request as ready for review December 19, 2025 05:17
@beinan beinan merged commit 41ff010 into lance-format:main Dec 20, 2025
9 checks passed
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.

3 participants