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

NULL and ops #3

Open
emliunix opened this issue Dec 20, 2019 · 0 comments
Open

NULL and ops #3

emliunix opened this issue Dec 20, 2019 · 0 comments

Comments

@emliunix
Copy link
Owner

In simple expression, it's natural to turn to null for insensible operations, eg. (1 + null => null).

By design, null is a special value included in all types. And in primitive operations, usually the result will be null if any operand is null except IS NULL.

However, there're more special handling required to make SQL useful.

In aggregation, we don't want to NULLify the whole state on first met of a null value. So maybe, for sum/cumsum, we can treat nulls as 0s.

Still not sure if any other special cases in aggregation functions.

Also, in sorting, should null be min or max.

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

No branches or pull requests

1 participant