in c3r-cli-spark/src/main/java/com/amazonaws/c3r/spark/io/schema/InteractiveSchemaGenerator.java [492:516]
PadType promptPadType(@NonNull final ColumnHeader targetHeader, final PadType defaultType) {
final PadType type;
consoleOutput.print("`" + targetHeader + "` padding type: [n]one, [f]ixed, or [m]ax");
if (defaultType != null) {
consoleOutput.print(" (default `" + defaultType.toString().toLowerCase() + "`)");
}
consoleOutput.print("? ");
final String userInput = readNextLineLowercase();
if (userInput.isBlank()) {
if (defaultType == null) {
consoleOutput.println("Expected a padding type, but found no input.");
}
type = defaultType;
} else if ("none".startsWith(userInput)) {
type = PadType.NONE;
} else if ("fixed".startsWith(userInput)) {
type = PadType.FIXED;
} else if ("max".startsWith(userInput)) {
type = PadType.MAX;
} else {
consoleOutput.println("Expected a valid padding type, but got `" + userInput + "`.");
type = null;
}
return type;
}