Skip to content

Null-safe wrapper for toIntExact #5639

@rbasralian

Description

@rbasralian

We should have a statically-imported wrapper for toIntExact() so that you can safely truncate longs to ints, with support for nulls.

Regular long-to-int cast are handled by io.deephaven.engine.table.impl.lang.QueryLanguageFunctionUtils#intCast(long), but we don't handle values that overflow int. And if you call java.lang.Math#toIntExact directly, NULL_LONG isn't handled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions