Skip to content

[MySQL] UNIX_TIMESTAMP should return NULL #3607

@yf-zs

Description

@yf-zs

ValueTimestamp t = (ValueTimestamp) value.convertTo(TypeInfo.TYPE_TIMESTAMP, session);

According to MySQL

UNIX_TIMESTAMP([date]): If date is NULL, it returns NULL

Actual :
When a value is null, it throws java.lang.ClassCastException: class org.h2.value.ValueNull cannot be cast to class org.h2.value.ValueTimestamp

Expected :
null should be returned

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions