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:22:00 UTC

[jira] [Created] (HUDI-362) Add a check if field in columns.

hong dongdong created HUDI-362:
----------------------------------

             Summary: Add a check if field in columns.
                 Key: HUDI-362
                 URL: https://issues.apache.org/jira/browse/HUDI-362
             Project: Apache Hudi (incubating)
          Issue Type: Improvement
          Components: CLI
            Reporter: hong dongdong


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)