The following code has different behavior on distributed CDAP vs SDK, in the case that the `columnsToUpdate` is an empty array of byte.
In the case that columnsToUpdate.length is 0, HBase implementation of Table retrieves all columns of the row, which can be unexpected, because then the logic in the above code would go and update all of the columns in the row. This is inconsistent with LevelDB and InMemory implementation of Table, which return an empty result (no columns), if `columnsToUpdate` is length 0.
Either one of two things need to happen:
1) LevelDB and InMemory implementation of Table need to be updated to return all rows when columns is empty.
2) HBase implementation of Table needs to be updated to return zero rows when columns is empty.
I am suggesting the second option, because the user may not always know the length of the requested columns (it may be computed programmatically as in the code snippet above), and it would be unexpected to retrieve all rows when requesting zero columns.
The request all columns, the user would still be able to use the `Table#get(byte row)` API.
This would also make it consistent with the `Table#delete(byte, byte columns)` API which deletes nothing if columns.length is 0.
If we make the 2nd change, then the semantics of the Get.java and Delete.java class will also have to be changed for consistency, when the columns being passed in are empty.
The Put.java class API is different in that it has no way to add more than one column at a time, and so no changes will be made to that. (It is a bit strange that the APIs compared to the Get/Delete vary like that, though).