[
https://issues.apache.org/jira/browse/HUDI-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
hong dongdong updated HUDI-362:
-------------------------------
Attachment: image-2019-11-25-15-32-14-057.png
> Adds a check for the existence of field
> ---------------------------------------
>
> Key: HUDI-362
> URL: https://issues.apache.org/jira/browse/HUDI-362
> Project: Apache Hudi (incubating)
> Issue Type: Improvement
> Components: CLI
> Reporter: hong dongdong
> Priority: Major
> Labels: pull-request-available
> Attachments: image-2019-11-25-15-32-14-057.png
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Use command
> {code:java}
> commits show --sortBy "Total Bytes Written" --desc true --limit 10{code}
> when sortBy field not in columns, it throw
> {code:java}
> Command failed java.lang.ArrayIndexOutOfBoundsException: -1
> -1
> java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.ArrayList.elementData(ArrayList.java:418)
> at java.util.ArrayList.get(ArrayList.java:431)
> at org.apache.hudi.cli.Table$1.compare(Table.java:125)
> at org.apache.hudi.cli.Table$1.compare(Table.java:122)
> at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355){code}
> It is better to give a friendly hint as:
> {code:java}
> Field[Total Bytes Writte] is not in table, given columns[[CommitTime, Total
> Bytes Written, Total Files Added, Total Files Updated, Total Partitions
> Written, Total Records Written, Total Update Records Written, Total Errors]]
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)