Skip to content

Commit a80c8a6

Browse files
committed
Rename store types
1 parent ae4e205 commit a80c8a6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Diff for: table/src/main/java/tech/ydb/table/description/TableDescription.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
*/
2626
public class TableDescription {
2727
public enum StoreType {
28-
ROWS,
29-
COLUMNS
28+
ROW,
29+
COLUMN
3030
}
3131

3232
private final StoreType storeType;
@@ -115,7 +115,7 @@ public List<ChangefeedDescription> getChangefeeds() {
115115
* BUILDER
116116
*/
117117
public static class Builder {
118-
private StoreType storeType = StoreType.ROWS;
118+
private StoreType storeType = StoreType.ROW;
119119
private List<String> primaryKeys = Collections.emptyList();
120120
private final LinkedHashMap<String, TypeAndFamily> columns = new LinkedHashMap<>();
121121
private final List<TableIndex> indexes = new ArrayList<>();

Diff for: table/src/main/java/tech/ydb/table/impl/BaseSession.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,10 @@ public CompletableFuture<Status> createTable(
367367
.addAllPrimaryKey(description.getPrimaryKeys());
368368

369369
switch (description.getStoreType()) {
370-
case ROWS:
370+
case ROW:
371371
request.setStoreType(YdbTable.StoreType.STORE_TYPE_ROW);
372372
break;
373-
case COLUMNS:
373+
case COLUMN:
374374
request.setStoreType(YdbTable.StoreType.STORE_TYPE_COLUMN);
375375
break;
376376
default:
@@ -743,10 +743,10 @@ private static TableDescription mapDescribeTable(
743743
TableDescription.Builder description = TableDescription.newBuilder();
744744
switch (result.getStoreType()) {
745745
case STORE_TYPE_ROW:
746-
description = description.setStoreType(TableDescription.StoreType.ROWS);
746+
description = description.setStoreType(TableDescription.StoreType.ROW);
747747
break;
748748
case STORE_TYPE_COLUMN:
749-
description = description.setStoreType(TableDescription.StoreType.COLUMNS);
749+
description = description.setStoreType(TableDescription.StoreType.COLUMN);
750750
break;
751751
case UNRECOGNIZED:
752752
case STORE_TYPE_UNSPECIFIED:

Diff for: table/src/test/java/tech/ydb/table/integration/AlterTableTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void alterTableTest() {
7474

7575
TableDescription description = describeResult.getValue();
7676

77-
Assert.assertEquals(TableDescription.StoreType.ROWS, description.getStoreType());
77+
Assert.assertEquals(TableDescription.StoreType.ROW, description.getStoreType());
7878
Assert.assertEquals(1, description.getColumnFamilies().size());
7979
Assert.assertEquals(DEFAULT_FAMILY, description.getColumnFamilies().get(0).getName());
8080

0 commit comments

Comments
 (0)