You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "hong dongdong (Jira)" <ji...@apache.org> on 2019/11/25 07:26:00 UTC

[jira] [Updated] (HUDI-362) Adds a check for the existence of field

     [ https://issues.apache.org/jira/browse/HUDI-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

hong dongdong updated HUDI-362:
-------------------------------
    Summary: Adds a check for the existence of field  (was: Add a check if field in columns.)

> 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
>
> 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)