Skip to content

Commit e572ea0

Browse files
authored
generator.sh - gracefully handle uppercase format (#7858)
1 parent 5b9b836 commit e572ea0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/GenerateDataCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class GenerateDataCommand extends AbstractBaseAdminCommand implements Com
7979
private boolean _help = false;
8080

8181
@CommandLine.Option(names = {"-format"}, required = false, help = true,
82-
description = "Output format ('avro' or 'csv').")
82+
description = "Output format ('AVRO' or 'CSV').")
8383
private String _format = FORMAT_AVRO;
8484

8585
@Override
@@ -147,9 +147,9 @@ public boolean execute()
147147
final DataGenerator gen = new DataGenerator();
148148
gen.init(spec);
149149

150-
if (FORMAT_AVRO.equals(_format)) {
150+
if (FORMAT_AVRO.equalsIgnoreCase(_format)) {
151151
gen.generateAvro(_numRecords, _numFiles);
152-
} else if (FORMAT_CSV.equals(_format)) {
152+
} else if (FORMAT_CSV.equalsIgnoreCase(_format)) {
153153
gen.generateCsv(_numRecords, _numFiles);
154154
} else {
155155
throw new IllegalArgumentException(String.format("Invalid output format '%s'", _format));

0 commit comments

Comments
 (0)