Skip to content

Conversation

@SubhamSinghal
Copy link

@SubhamSinghal SubhamSinghal commented Jan 26, 2026

What changes are included in this PR?

Adds support for negative spark function in data fusion.

Are these changes tested?

yes, using UTs

Are there any user-facing changes?

yes, adds new function.

@SubhamSinghal SubhamSinghal changed the title Adds negative spark function feat(spark): Adds negative spark function Jan 26, 2026
@github-actions github-actions bot added the spark label Jan 26, 2026
@comphead
Copy link
Contributor

Running CI

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.

Thanks @SubhamSinghal

Please add .slt tests for negative functions, the simplest case is https://spark.apache.org/docs/latest/api/sql/#negative

However you can generate bunch of other edge cases with LLM

SubhamSinghal and others added 4 commits January 27, 2026 18:39
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Jan 27, 2026
SubhamSinghal and others added 5 commits January 27, 2026 22:27
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
SubhamSinghal and others added 5 commits January 28, 2026 18:51
Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
@SubhamSinghal
Copy link
Author

Could you please also add some tests for them to negative.slt ?

Done

comphead
comphead previously approved these changes Jan 28, 2026
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.

Thanks @SubhamSinghal IMO the PR is good to go, appreciate the contribution

UPD: CI is failing now for tests, I'll wait for green CI, however as I said before the PR looks good overall

@comphead comphead self-requested a review January 28, 2026 18:15
@comphead comphead dismissed their stale review January 28, 2026 18:15

waiting for CI

SubhamSinghal and others added 2 commits January 29, 2026 08:33
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
@SubhamSinghal
Copy link
Author

@comphead Changes Signature from Signature::numeric to Signature::any to allow IntervalType. Can you run CI again?

SELECT negative(1.7976931348623157e308::double);
----
-1.7976931348623157e308
-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why this would change? is it the same datatype returned?

Copy link
Author

Choose a reason for hiding this comment

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

I think issue is with scientific notation representation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spark sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants