Check for void type for output serde
@@ -269,8 +269,10 @@ public class CmdFunctions extends CmdBase {
throw new RuntimeException("Default Serializer does not support type " + typeArgs[0]);
}
});
+ if (!Void.class.equals(typeArgs[1])) {
if (functionConfigBuilder.getOutputSerdeClassName() == null
- || functionConfigBuilder.getOutputSerdeClassName().isEmpty()) {
+ || functionConfigBuilder.getOutputSerdeClassName().isEmpty()
+ || functionConfigBuilder.getOutputSerdeClassName().equals(DefaultSerDe.class.getName())) {
if (!DefaultSerDe.IsSupportedType(typeArgs[1])) {
throw new RuntimeException("Default Serializer does not support type " + typeArgs[1]);
}
@@ -286,6 +288,7 @@ public class CmdFunctions extends CmdBase {
}
}
}
+ }
private void inferMissingArguments(FunctionConfig.Builder builder) {
if (builder.getName() == null || builder.getName().isEmpty()) {
