Skip to content

Commit 7293681

Browse files
committed
Rename conjuctions check method
1 parent 9e21de8 commit 7293681

File tree

5 files changed

+16
-20
lines changed

5 files changed

+16
-20
lines changed

core/src/main/java/com/scalar/db/storage/jdbc/JdbcOperationChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ protected void checkOrderingsForScanAll(ScanAll scanAll, TableMetadata metadata)
3131
@Override
3232
protected void checkConjunctions(Selection selection, TableMetadata metadata) {
3333
super.checkConjunctions(selection, metadata);
34-
rdbEngine.throwIfConjunctionsOnBlobColumnNotSupported(selection.getConjunctions(), metadata);
34+
rdbEngine.throwIfConjunctionsColumnNotSupported(selection.getConjunctions(), metadata);
3535
}
3636
}

core/src/main/java/com/scalar/db/storage/jdbc/RdbEngineOracle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ public void throwIfCrossPartitionScanOrderingOnBlobColumnNotSupported(
474474
}
475475

476476
@Override
477-
public void throwIfConjunctionsOnBlobColumnNotSupported(
477+
public void throwIfConjunctionsColumnNotSupported(
478478
Set<Conjunction> conjunctions, TableMetadata metadata) {
479479
Optional<ConditionalExpression> conditionalExpression =
480480
conjunctions.stream()

core/src/main/java/com/scalar/db/storage/jdbc/RdbEngineStrategy.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,14 @@ default void throwIfCrossPartitionScanOrderingOnBlobColumnNotSupported(
315315
ScanAll scanAll, TableMetadata metadata) {}
316316

317317
/**
318-
* Throws an exception if one of the conjunction targets a blob column and is not supported in the
319-
* underlying storage.
318+
* Throws an exception if one of the conjunctions column is not supported in the underlying
319+
* storage.
320320
*
321321
* @param conjunctions a set of conjunction
322322
* @param metadata the table metadata
323-
* @throws UnsupportedOperationException if one of the conjunction targets a blob column, and it
324-
* is not supported in the underlying storage
323+
* @throws UnsupportedOperationException if one of the conjunctions column is not supported in the
324+
* underlying storage
325325
*/
326-
default void throwIfConjunctionsOnBlobColumnNotSupported(
326+
default void throwIfConjunctionsColumnNotSupported(
327327
Set<Conjunction> conjunctions, TableMetadata metadata) {}
328328
}

core/src/test/java/com/scalar/db/storage/jdbc/JdbcOperationCheckerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void checkConjunctions_ShouldInvokeAdditionalCheckOnRdbEngine() {
8585
operationChecker.checkConjunctions(selection, tableMetadata);
8686

8787
// Assert
88-
verify(rdbEngine).throwIfConjunctionsOnBlobColumnNotSupported(conjunctions, tableMetadata);
88+
verify(rdbEngine).throwIfConjunctionsColumnNotSupported(conjunctions, tableMetadata);
8989
}
9090

9191
@Test
@@ -94,7 +94,7 @@ public void checkConjunctions_WhenAdditionalCheckThrows_ShouldPropagateException
9494
Exception exception = new RuntimeException();
9595
doThrow(exception)
9696
.when(rdbEngine)
97-
.throwIfConjunctionsOnBlobColumnNotSupported(any(), any(TableMetadata.class));
97+
.throwIfConjunctionsColumnNotSupported(any(), any(TableMetadata.class));
9898
Set<Conjunction> conjunctions = Collections.emptySet();
9999
when(selection.getConjunctions()).thenReturn(conjunctions);
100100

@@ -104,6 +104,6 @@ public void checkConjunctions_WhenAdditionalCheckThrows_ShouldPropagateException
104104
.isEqualTo(exception);
105105

106106
// Assert
107-
verify(rdbEngine).throwIfConjunctionsOnBlobColumnNotSupported(conjunctions, tableMetadata);
107+
verify(rdbEngine).throwIfConjunctionsColumnNotSupported(conjunctions, tableMetadata);
108108
}
109109
}

core/src/test/java/com/scalar/db/storage/jdbc/RdbEngineOracleTest.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ void createTableInternalSqlsAfterCreateTable_GivenDifferentClusteringOrders_Shou
153153
}
154154

155155
@Test
156-
public void
157-
throwIfConjunctionsOnBlobColumnNotSupported_WithoutBlobCondition_ShouldNotThrowException() {
156+
public void throwIfConjunctionsColumnNotSupported_WithoutBlobCondition_ShouldNotThrowException() {
158157
// Arrange
159158
TableMetadata metadata = mock(TableMetadata.class);
160159
java.util.Set<Conjunction> conjunctions =
@@ -168,28 +167,26 @@ void createTableInternalSqlsAfterCreateTable_GivenDifferentClusteringOrders_Shou
168167

169168
// Act & Assert
170169
assertThatCode(
171-
() ->
172-
rdbEngineOracle.throwIfConjunctionsOnBlobColumnNotSupported(conjunctions, metadata))
170+
() -> rdbEngineOracle.throwIfConjunctionsColumnNotSupported(conjunctions, metadata))
173171
.doesNotThrowAnyException();
174172
}
175173

176174
@Test
177-
public void
178-
throwIfConjunctionsOnBlobColumnNotSupported_WithNoConditions_ShouldNotThrowException() {
175+
public void throwIfConjunctionsColumnNotSupported_WithNoConditions_ShouldNotThrowException() {
179176
// Arrange
180177
TableMetadata metadata = mock(TableMetadata.class);
181178

182179
// Act & Assert
183180
assertThatCode(
184181
() ->
185-
rdbEngineOracle.throwIfConjunctionsOnBlobColumnNotSupported(
182+
rdbEngineOracle.throwIfConjunctionsColumnNotSupported(
186183
java.util.Collections.emptySet(), metadata))
187184
.doesNotThrowAnyException();
188185
}
189186

190187
@Test
191188
public void
192-
throwIfConjunctionsOnBlobColumnNotSupported_WithMixedConditions_ShouldThrowWhenBlobPresent() {
189+
throwIfConjunctionsColumnNotSupported_WithMixedConditions_ShouldThrowWhenBlobPresent() {
193190
// Arrange
194191
TableMetadata metadata = mock(TableMetadata.class);
195192
java.util.Set<Conjunction> conjunctions =
@@ -205,8 +202,7 @@ void createTableInternalSqlsAfterCreateTable_GivenDifferentClusteringOrders_Shou
205202

206203
// Act & Assert
207204
assertThatThrownBy(
208-
() ->
209-
rdbEngineOracle.throwIfConjunctionsOnBlobColumnNotSupported(conjunctions, metadata))
205+
() -> rdbEngineOracle.throwIfConjunctionsColumnNotSupported(conjunctions, metadata))
210206
.isInstanceOf(UnsupportedOperationException.class)
211207
.hasMessageContaining("blob_column");
212208
}

0 commit comments

Comments
 (0)