lamber-ken opened a new pull request #1138: [HUDI-470] Fix NPE when print result via hudi-cli URL: https://github.com/apache/incubator-hudi/pull/1138 ## What is the purpose of the pull request The size of `rows` is error, for example ``` List<String> allRecords = Arrays.asList(); String[][] rows = new String[allRecords.size() + 1][]; int i = 0; for (String record : allRecords) { String[] data = new String[1]; data[0] = record; rows[i++] = data; } HoodiePrintHelper.print(new String[]{"Partition Path"}, rows); ``` Result is: ``` Exception in thread "main" java.lang.NullPointerException at com.jakewharton.fliptables.FlipTable.<init>(FlipTable.java:37) at com.jakewharton.fliptables.FlipTable.of(FlipTable.java:20) at org.apache.hudi.cli.HoodiePrintHelper.printTextTable(HoodiePrintHelper.java:110) at org.apache.hudi.cli.HoodiePrintHelper.print(HoodiePrintHelper.java:43) at org.apache.hudi.cli.commands.RepairsCommand.main(RepairsCommand.java:127) ``` ## Brief change log - Fix NPE when print result via hudi-cli ## Verify this pull request This pull request is a code cleanup without any test coverage. ## Committer checklist - [ ] Has a corresponding JIRA in PR title & commit - [ ] Commit message is descriptive of the change - [ ] CI is green - [ ] Necessary doc changes done or have another open PR - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
