Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,31 @@ private TypeSpec type() {
processFunction.args.forEach(a -> a.declareField(builder));
builder.addField(DRIVER_CONTEXT, "driverContext", Modifier.PRIVATE, Modifier.FINAL);

builder.addField(WARNINGS, "warnings", Modifier.PRIVATE);
var hasFixedProcessFunctionArgs = processFunction.args.stream().anyMatch(x -> x instanceof FixedArgument == false);
var usesWarnings = processFunction.warnExceptions.isEmpty() == false || hasFixedProcessFunctionArgs && allNullsIsNull;

if (usesWarnings) {
builder.addField(WARNINGS, "warnings", Modifier.PRIVATE);
}
builder.addMethod(ctor());
builder.addMethod(eval());
builder.addMethod(processFunction.baseRamBytesUsed());

if (processOutputsMultivalued) {
if (processFunction.args.stream().anyMatch(x -> x instanceof FixedArgument == false)) {
if (hasFixedProcessFunctionArgs) {
builder.addMethod(realEval(true));
}
} else {
if (processFunction.args.stream().anyMatch(x -> x instanceof FixedArgument == false)) {
if (hasFixedProcessFunctionArgs) {
builder.addMethod(realEval(true));
}
builder.addMethod(realEval(false));
}
builder.addMethod(processFunction.toStringMethod(implementation));
builder.addMethod(processFunction.close());
builder.addMethod(warnings());
if (usesWarnings) {
builder.addMethod(warnings());
}
return builder.build();
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.