nastra commented on code in PR #13913:
URL: https://github.com/apache/iceberg/pull/13913#discussion_r2371316716
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/procedures/RewriteManifestsProcedure.java:
##########
@@ -89,9 +92,10 @@ public ProcedureParameter[] parameters() {
@Override
public Iterator<Scan> call(InternalRow args) {
- Identifier tableIdent = toIdentifier(args.getString(0),
PARAMETERS[0].name());
- Boolean useCaching = args.isNullAt(1) ? null : args.getBoolean(1);
- Integer specId = args.isNullAt(2) ? null : args.getInt(2);
+ ProcedureInput input = new ProcedureInput(spark(), tableCatalog(),
PARAMETERS, args);
+ Identifier tableIdent = input.ident(TABLE_PARAM);
+ Boolean useCaching = input.asBoolean(USE_CACHING_PARAM, false);
Review Comment:
```suggestion
Boolean useCaching = input.asBoolean(USE_CACHING_PARAM, null);
```
the default should be `null` and not `false` here in order to maintain the
original behavior
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/procedures/RewriteManifestsProcedure.java:
##########
@@ -89,9 +92,10 @@ public ProcedureParameter[] parameters() {
@Override
public Iterator<Scan> call(InternalRow args) {
- Identifier tableIdent = toIdentifier(args.getString(0),
PARAMETERS[0].name());
- Boolean useCaching = args.isNullAt(1) ? null : args.getBoolean(1);
- Integer specId = args.isNullAt(2) ? null : args.getInt(2);
+ ProcedureInput input = new ProcedureInput(spark(), tableCatalog(),
PARAMETERS, args);
+ Identifier tableIdent = input.ident(TABLE_PARAM);
+ Boolean useCaching = input.asBoolean(USE_CACHING_PARAM, false);
Review Comment:
the default should be `null` and not `false` here in order to maintain the
original behavior
--
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]