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

Built-in conversion functions convert NULL to default(T) instead of returning NULL #34

Open
dallmair opened this issue Aug 4, 2017 · 1 comment

Comments

@dallmair
Copy link

dallmair commented Aug 4, 2017

At the moment, every ToXxx method in BuildInFunctions returns the Xxx type's default value. This is somewhat understandable for the integer types, but TO_BOOLEAN(NULL) returning FALSE is hard to understand for users, and with TO_DATETIME(NULL) returning 0001-01-01 00:00:00 it's almost impossible to convince users that this behavior is intended (though of course it obviously is, because the code is currently explicitly written to perform this way).

From my point of view, these conversion functions should be changed to return NULL instead. When #30 is done, this could be as simple as not handling the NULL values manually anymore.

@dallmair
Copy link
Author

Works fine in v.Next.

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