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.
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 overflowint. And if you calljava.lang.Math#toIntExactdirectly,NULL_LONGisn't handled.