[Java] Add the RangeSchema.getColumnIds Currently RangeSchema has a method that returns column IDs called getColumns. Because the return type is a list of integers itâs unclear if the integers are column indexes or column IDs.
This change matches the HashBucketSchema by naming the method getColumnIds. It also deprecates the old method, and adds Javadoc to make the return value clear. Change-Id: Ie4fd944d6b38a2b3fd0ab7f8d6c254be380b2972 Reviewed-on: http://gerrit.cloudera.org:8080/10390 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Dan Burkert <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/eb81a04d Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/eb81a04d Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/eb81a04d Branch: refs/heads/master Commit: eb81a04db9a9d3f9eaf5bc685d787bd4f908daea Parents: 93caf44 Author: Grant Henke <[email protected]> Authored: Mon May 14 12:46:20 2018 -0500 Committer: Grant Henke <[email protected]> Committed: Wed May 16 02:42:22 2018 +0000 ---------------------------------------------------------------------- .../org/apache/kudu/client/PartitionSchema.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/eb81a04d/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java ---------------------------------------------------------------------- diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java b/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java index 29dc28d..502eea6 100644 --- a/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java +++ b/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java @@ -109,9 +109,23 @@ public class PartitionSchema { this.columns = columns; } + /** + * Gets the column IDs of the columns in the range partition. + * @return the column IDs of the columns in the range partition + * @deprecated Use {@link #getColumnIds} instead. + */ + @Deprecated public List<Integer> getColumns() { return columns; } + + /** + * Gets the column IDs of the columns in the range partition. + * @return the column IDs of the columns in the range partition + */ + public List<Integer> getColumnIds() { + return columns; + } } public static class HashBucketSchema { @@ -127,7 +141,7 @@ public class PartitionSchema { /** * Gets the column IDs of the columns in the hash partition. - * @return the column IDs of the columns in the has partition + * @return the column IDs of the columns in the hash partition */ public List<Integer> getColumnIds() { return columnIds;
