ygerzhedovich commented on a change in pull request #708:
URL: https://github.com/apache/ignite-3/pull/708#discussion_r822702185
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/definition/builder/PrimaryKeyDefinitionBuilderImpl.java
##########
@@ -73,8 +73,8 @@ public PrimaryKeyDefinitionBuilderImpl
withAffinityColumns(String... affinityCol
/** {@inheritDoc} */
@Override
- public PrimaryKeyDefinitionBuilderImpl withAffinityColumns(List<String>
affinityColumns) {
- this.affinityColumns = affinityColumns == null
+ public PrimaryKeyDefinitionBuilderImpl withColocationColumns(List<String>
affinityColumns) {
Review comment:
affinity.... -> colocation....
##########
File path:
modules/schema/src/test/java/org/apache/ignite/internal/schema/SchemaConfigurationTest.java
##########
@@ -51,7 +53,7 @@ public void testInitialSchema() {
.withPrimaryKey(
SchemaBuilders.primaryKey() // Declare index column
in order.
.withColumns("id", "affId", "name")
- .withAffinityColumns(
+ .withColocationColumns(
"affId") // Optional affinity
declaration. If not set, all columns will be affinity cols.
Review comment:
Affinity -> Colocation
##########
File path:
modules/api/src/main/java/org/apache/ignite/schema/definition/builder/PrimaryKeyDefinitionBuilder.java
##########
@@ -30,15 +30,15 @@
* @param cols Affinity columns. Must be a valid subset of key columns.
Review comment:
Affinity -> Colocation
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/definition/TableDefinitionImpl.java
##########
@@ -51,7 +51,7 @@
private final Set<String> keyCols;
/** Cached key affinity columns. */
Review comment:
Affinity -> Colocation
##########
File path:
modules/schema/src/test/java/org/apache/ignite/internal/schema/builder/PrimaryKeyDefinitionDefinitionBuilderTest.java
##########
@@ -61,18 +61,18 @@ public void testPrimaryKey() {
PrimaryKeyDefinition idx = builder.build();
assertEquals(3, idx.columns().size());
- assertEquals(3, idx.affinityColumns().size());
+ assertEquals(3, idx.colocationColumns().size());
assertTrue(idx.columns().containsAll(List.of("A", "B", "C")));
- assertTrue(idx.affinityColumns().containsAll(List.of("A", "B", "C")));
+ assertTrue(idx.colocationColumns().containsAll(List.of("A", "B",
"C")));
}
/** Test primary key parameters. */
@Test
public void testPrimaryKeyWrongAffinityColumn() {
Review comment:
Affinity -> Colocation
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/marshaller/schema/SchemaSerializerImpl.java
##########
@@ -89,7 +89,7 @@ public void writeTo(SchemaDescriptor desc, ByteBuffer
byteBuf) {
appendColumns(desc.keyColumns(), byteBuf);
appendColumns(desc.valueColumns(), byteBuf);
- Column[] affinityCols = desc.affinityColumns();
+ Column[] affinityCols = desc.colocationColumns();
Review comment:
affinity -> colocation
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/marshaller/schema/SchemaSerializerImpl.java
##########
@@ -133,7 +133,7 @@ public int size(SchemaDescriptor desc) {
+ getColumnsSize(desc.keyColumns())
+ getColumnsSize(desc.valueColumns())
+ ARRAY_HEADER_LENGTH //Affinity columns length
Review comment:
Affinity -> Colocation
##########
File path:
modules/schema/src/test/java/org/apache/ignite/internal/schema/builder/PrimaryKeyDefinitionDefinitionBuilderTest.java
##########
@@ -37,18 +37,18 @@
public void testPrimaryKeyWithAffinityColumns() {
Review comment:
Affinity -> Colocation
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/definition/builder/PrimaryKeyDefinitionBuilderImpl.java
##########
@@ -63,8 +63,8 @@ public PrimaryKeyDefinitionBuilderImpl
withColumns(List<String> columns) {
/** {@inheritDoc} */
@Override
- public PrimaryKeyDefinitionBuilderImpl withAffinityColumns(String...
affinityColumns) {
- this.affinityColumns = affinityColumns == null
+ public PrimaryKeyDefinitionBuilderImpl withColocationColumns(String...
affinityColumns) {
Review comment:
affinityCollumns -> colocationColumns
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]