Skip to content

[AURON #2050] Support UnaryMinus expression#2051

Open
yew1eb wants to merge 2 commits intoapache:masterfrom
yew1eb:AURON_2050
Open

[AURON #2050] Support UnaryMinus expression#2051
yew1eb wants to merge 2 commits intoapache:masterfrom
yew1eb:AURON_2050

Conversation

@yew1eb
Copy link
Contributor

@yew1eb yew1eb commented Feb 28, 2026

Which issue does this PR close?

Closes #2050

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

How was this patch tested?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds native support for Spark Catalyst UnaryMinus expressions so queries using negative(col) or -(col) no longer fall back to Spark execution.

Changes:

  • Extend NativeConverters to translate UnaryMinus into the protobuf PhysicalNegativeNode.
  • Add a Spark SQL integration test covering negative(col1) and -(col1) over a Parquet table (including nulls and edge int values).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala Adds conversion logic for Catalyst UnaryMinus to PhysicalNegativeNode in the native expression protobuf.
spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronExpressionSuite.scala Adds a test ensuring unary minus executes with the native operator and matches Spark results.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yew1eb yew1eb force-pushed the AURON_2050 branch 5 times, most recently from 746266f to 276ed37 Compare March 1, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsupported expression UnaryMinus

2 participants