nastra commented on code in PR #13913:
URL: https://github.com/apache/iceberg/pull/13913#discussion_r2366815837
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/procedures/ProcedureInput.java:
##########
@@ -92,6 +109,22 @@ public Long asLong(ProcedureParameter param, Long
defaultValue) {
return args.isNullAt(ordinal) ? defaultValue : (Long)
args.getLong(ordinal);
}
+ public long[] asLongArray(ProcedureParameter param, Long[] defaultValue) {
+ validateParamType(param, DataTypes.createArrayType(DataTypes.LongType));
+ Long[] source =
+ array(param, (array, ordinal) -> array.getLong(ordinal), Long.class,
defaultValue);
+
+ if (source == null) {
+ return null;
Review Comment:
should this rather be returning the `defaultValue`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]