You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/11/25 07:30:43 UTC

[GitHub] [incubator-hudi] hddong opened a new pull request #1047: [HUDI-362] Adds a check for the existence of field

hddong opened a new pull request #1047: [HUDI-362] Adds a check for the existence of field
URL: https://github.com/apache/incubator-hudi/pull/1047
 
 
   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contributing.html before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   Use command
   
   commits show --sortBy "Total Bytes Written" --desc true --limit 10
   when  sortBy field not in columns, it throw 
   ```
   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)
   ```
   It is better to give a friendly hint as:
   ```
   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]]
   ```
   
   ## Brief change log
   
   *(for example:)*
     - *Adds a check for the existence of field in hudi cli*
   
   ## Verify this pull request
   
   This pull request is a trivial rework / 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:
users@infra.apache.org


With regards,
Apache Git Services