/** * Returns an array of booleans indicating if any input argument is nullable. * * Nullable arguments are arguments that can receive a null value. For a nullable argument, the user must explicitly * handle null values in their implementation. For a non-nullable argument, the UDF returns null if the argument * is null. The length of the returned array should be equal to the number of input arguments. Defaults to all * arguments being non-nullable. */ public boolean[] getNullableArguments() { return new boolean[numberOfArguments()]; }
/** * Returns an array of booleans indicating if any input argument is nullable. * * Nullable arguments are arguments that can receive a null value. For a nullable argument, the user must explicitly * handle null values in their implementation. For a non-nullable argument, the UDF returns null if the argument * is null. The length of the returned array should be equal to the number of input arguments. Defaults to all * arguments being non-nullable. */ public boolean[] getNullableArguments() { return new boolean[numberOfArguments()]; }
/** Returns an array of booleans indicating if any input argument is nullable and also verifies its length */ public final boolean[] getAndCheckNullableArguments() { boolean[] nullableArguments = getNullableArguments(); if (nullableArguments.length != numberOfArguments()) { throw new RuntimeException( "Unexpected number of nullable arguments. Expected:" + numberOfArguments() + " Received:" + nullableArguments.length); } return nullableArguments; }
/** Returns an array of booleans indicating if any input argument is nullable and also verifies its length */ public final boolean[] getAndCheckNullableArguments() { boolean[] nullableArguments = getNullableArguments(); if (nullableArguments.length != numberOfArguments()) { throw new RuntimeException( "Unexpected number of nullable arguments. Expected:" + numberOfArguments() + " Received:" + nullableArguments.length); } return nullableArguments; }