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

- operator support NULL constants #2249

Closed
wants to merge 1 commit into from

Conversation

WinkerDu
Copy link
Contributor

Which issue does this PR close?

Closes #1192 .

Rationale for this change

Reproducer:

> select -null;
Internal("(- 'Literal { value: Utf8(NULL) }') can't be evaluated because the expression's type is Utf8, not signed numeric")

The result comes out NULL with this pr

What changes are included in this PR?

  • NegativeExpr accepts NULL input then return ScalarValue::Int32(None) as NULL
  • do is_signed_numeric type check when NegativeExpr evaluates

Are there any user-facing changes?

@github-actions github-actions bot added the datafusion Changes in the datafusion crate label Apr 16, 2022
@WinkerDu
Copy link
Contributor Author

WinkerDu commented Apr 16, 2022

@alamb @xudong963 @yjshen plz have a review, thank you.

@liukun4515
Copy link
Contributor

My opinion for this feature or new dialect #1192 (comment)

@WinkerDu
Copy link
Contributor Author

Close this pr since more conservative opinions of introducing -NULL SQL dialect, see #1192

@WinkerDu WinkerDu closed this Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate
Projects
None yet
2 participants