Skip to content

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

@dallmair

Description

@dallmair

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions