From 3cdce967c20001080814e11057cabeaaa51c229c Mon Sep 17 00:00:00 2001 From: Yuqi Du Date: Tue, 12 Nov 2024 15:33:10 -0800 Subject: [PATCH 1/3] init --- .../jsonapi/exception/FilterException.java | 1 + .../operation/UpdateAttemptBuilder.java | 5 +- .../tables/WhereCQLClauseAnalyzer.java | 35 +++++++++++++- .../resolver/UpdateOneCommandResolver.java | 2 +- src/main/resources/errors.yaml | 10 ++++ .../testdata/LogicalExpressionTestData.java | 11 +++++ .../tables/DeleteUpdateWhereAnalyzerTest.java | 46 +++++++++++++++---- 7 files changed, 95 insertions(+), 15 deletions(-) diff --git a/src/main/java/io/stargate/sgv2/jsonapi/exception/FilterException.java b/src/main/java/io/stargate/sgv2/jsonapi/exception/FilterException.java index 291c327bc..4aaa0a035 100644 --- a/src/main/java/io/stargate/sgv2/jsonapi/exception/FilterException.java +++ b/src/main/java/io/stargate/sgv2/jsonapi/exception/FilterException.java @@ -20,6 +20,7 @@ public enum Code implements ErrorCode { FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE, INCOMPLETE_PRIMARY_KEY_FILTER, INVALID_FILTER, + INVALID_IN_FILTER_FOR_UPDATE_ONE_DELETE_ONE, NON_PRIMARY_KEY_FILTER_FOR_UPDATE_DELETE, UNKNOWN_TABLE_COLUMNS, UNSUPPORTED_COLUMN_TYPES, diff --git a/src/main/java/io/stargate/sgv2/jsonapi/service/operation/UpdateAttemptBuilder.java b/src/main/java/io/stargate/sgv2/jsonapi/service/operation/UpdateAttemptBuilder.java index 3981f0059..435c0ccf5 100644 --- a/src/main/java/io/stargate/sgv2/jsonapi/service/operation/UpdateAttemptBuilder.java +++ b/src/main/java/io/stargate/sgv2/jsonapi/service/operation/UpdateAttemptBuilder.java @@ -24,11 +24,12 @@ public class UpdateAttemptBuilder { private final SchemaT tableBasedSchema; private final WhereCQLClauseAnalyzer whereCQLClauseAnalyzer; - public UpdateAttemptBuilder(SchemaT tableBasedSchema) { + public UpdateAttemptBuilder(SchemaT tableBasedSchema, boolean updateOne) { this.tableBasedSchema = tableBasedSchema; this.whereCQLClauseAnalyzer = - new WhereCQLClauseAnalyzer(tableBasedSchema, WhereCQLClauseAnalyzer.StatementType.UPDATE); + new WhereCQLClauseAnalyzer( + tableBasedSchema, WhereCQLClauseAnalyzer.StatementType.UPDATE_ONE); } public UpdateAttempt build( diff --git a/src/main/java/io/stargate/sgv2/jsonapi/service/operation/tables/WhereCQLClauseAnalyzer.java b/src/main/java/io/stargate/sgv2/jsonapi/service/operation/tables/WhereCQLClauseAnalyzer.java index d42ba0b00..1253c70ea 100644 --- a/src/main/java/io/stargate/sgv2/jsonapi/service/operation/tables/WhereCQLClauseAnalyzer.java +++ b/src/main/java/io/stargate/sgv2/jsonapi/service/operation/tables/WhereCQLClauseAnalyzer.java @@ -40,7 +40,8 @@ public class WhereCQLClauseAnalyzer { /** Different statementTypes for analyzer to work on, thus different strategies. */ public enum StatementType { SELECT, - UPDATE, + // currently, table feature only supports updateOne + UPDATE_ONE, DELETE_ONE, DELETE_MANY; @@ -63,12 +64,13 @@ AnalysisStrategy getStrategy(WhereCQLClauseAnalyzer analyzer) { analyzer::warnNotInUnsupportedByIndexing, analyzer::warnNoFilters, analyzer::warnPkNotFullySpecified)); - case DELETE_ONE, UPDATE -> + case DELETE_ONE, UPDATE_ONE -> new AnalysisStrategy( List.of( analyzer::checkNoFilters, analyzer::checkAllColumnsExist, analyzer::checkNonPrimaryKeyFilters, + analyzer::checkNoInFilterUsage, analyzer::checkFullPrimaryKey, analyzer::checkFilteringOnComplexColumns), List.of()); @@ -237,6 +239,35 @@ private void checkFilteringOnComplexColumns(Map iden } } + /** + * Check if any $in filter is used. + * + *

For UpdateOne and DeleteOne table commands, the use of $in/$nin can affect multiple rows, so + * add a check rule to ban the usage. + */ + private void checkNoInFilterUsage(Map identifierToFilter) { + + var inFilterColumns = + identifierToFilter.entrySet().stream() + .filter( + entry -> { + TableFilter tableFilter = entry.getValue(); + return (tableFilter instanceof InTableFilter); + }) + .map((Map.Entry::getKey)) + .sorted(CQL_IDENTIFIER_COMPARATOR) + .toList(); + + if (!inFilterColumns.isEmpty()) { + throw FilterException.Code.INVALID_IN_FILTER_FOR_UPDATE_ONE_DELETE_ONE.get( + errVars( + tableSchemaObject, + map -> { + map.put("inFilterColumns", errFmtCqlIdentifier(inFilterColumns)); + })); + } + } + /** * Check if all primary keys components (partition keys, clustering keys) are specified in filter. * diff --git a/src/main/java/io/stargate/sgv2/jsonapi/service/resolver/UpdateOneCommandResolver.java b/src/main/java/io/stargate/sgv2/jsonapi/service/resolver/UpdateOneCommandResolver.java index 9938f6613..7a4ddec79 100644 --- a/src/main/java/io/stargate/sgv2/jsonapi/service/resolver/UpdateOneCommandResolver.java +++ b/src/main/java/io/stargate/sgv2/jsonapi/service/resolver/UpdateOneCommandResolver.java @@ -88,7 +88,7 @@ public Operation resolveTableCommand( errVars(ctx.schemaObject(), map -> {})); } - var builder = new UpdateAttemptBuilder<>(ctx.schemaObject()); + var builder = new UpdateAttemptBuilder<>(ctx.schemaObject(), true); // need to update so we use WithWarnings correctly var where = diff --git a/src/main/resources/errors.yaml b/src/main/resources/errors.yaml index cfbf1e9dd..82bb0377d 100644 --- a/src/main/resources/errors.yaml +++ b/src/main/resources/errors.yaml @@ -240,6 +240,16 @@ request-errors: Note, DeleteMany without a filter truncates the table. + - scope: FILTER + code: INVALID_IN_FILTER_FOR_UPDATE_ONE_DELETE_ONE + title: In filter is not allowed for UpdateOne and DeleteOne commands + body: |- + An UpdateOne or DeleteOne command was issued with $in/$nin filter, filter columns are ${inFilterColumns}. + + $in/$nin is not allowed for UpdateOne and DeleteOne commands, since multiple rows could be affected. + + Resend the request without using $in/$nin filters. + - scope: FILTER code: NON_PRIMARY_KEY_FILTER_FOR_UPDATE_DELETE title: Only Primary Key columns can be filtered on for Update and Delete commands diff --git a/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/LogicalExpressionTestData.java b/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/LogicalExpressionTestData.java index 3ab18805a..7866918aa 100644 --- a/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/LogicalExpressionTestData.java +++ b/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/LogicalExpressionTestData.java @@ -71,6 +71,17 @@ public FixtureT eqAllPrimaryKeys() { return eqAllClusteringKeys(); } + public FixtureT inOnOnePartitionKey(InTableFilter.Operator inFilterOperator) { + final ColumnMetadata firstPartitionKey = tableMetadata.getPartitionKey().getFirst(); + if (inFilterOperator == InTableFilter.Operator.IN) { + expression.addFilter(in(firstPartitionKey)); + } + if (inFilterOperator == InTableFilter.Operator.NIN) { + expression.addFilter(nin(firstPartitionKey)); + } + return fixture; + } + public FixtureT eqAllPartitionKeys() { tableMetadata .getPartitionKey() diff --git a/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java b/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java index c544b42d9..20bb400aa 100644 --- a/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java +++ b/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java @@ -3,6 +3,7 @@ import io.stargate.sgv2.jsonapi.exception.FilterException; import io.stargate.sgv2.jsonapi.fixtures.testdata.TestData; import io.stargate.sgv2.jsonapi.fixtures.testdata.TestDataNames; +import io.stargate.sgv2.jsonapi.service.operation.filters.table.InTableFilter; import io.stargate.sgv2.jsonapi.service.operation.tables.WhereCQLClauseAnalyzer.StatementType; import java.util.stream.Stream; import org.junit.jupiter.params.ParameterizedTest; @@ -36,7 +37,8 @@ private static Stream emptyFilterTests() { StatementType.DELETE_ONE, FilterException.Code.FILTER_REQUIRED_FOR_UPDATE_DELETE), Arguments.of( StatementType.DELETE_MANY, FilterException.Code.FILTER_REQUIRED_FOR_UPDATE_DELETE), - Arguments.of(StatementType.UPDATE, FilterException.Code.FILTER_REQUIRED_FOR_UPDATE_DELETE)); + Arguments.of( + StatementType.UPDATE_ONE, FilterException.Code.FILTER_REQUIRED_FOR_UPDATE_DELETE)); } @ParameterizedTest @@ -54,7 +56,7 @@ private static Stream eqAllPrimaryKeysTests() { return Stream.of( Arguments.of(StatementType.DELETE_ONE, null), Arguments.of(StatementType.DELETE_MANY, null), - Arguments.of(StatementType.UPDATE, null)); + Arguments.of(StatementType.UPDATE_ONE, null)); } @ParameterizedTest @@ -81,7 +83,8 @@ private static Stream eqOnNonPrimaryKeyOrIndexedTests() { StatementType.DELETE_MANY, FilterException.Code.NON_PRIMARY_KEY_FILTER_FOR_UPDATE_DELETE), Arguments.of( - StatementType.UPDATE, FilterException.Code.NON_PRIMARY_KEY_FILTER_FOR_UPDATE_DELETE)); + StatementType.UPDATE_ONE, + FilterException.Code.NON_PRIMARY_KEY_FILTER_FOR_UPDATE_DELETE)); } @ParameterizedTest @@ -118,7 +121,7 @@ private static Stream eqMissingPartitionKeyTests() { FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE), Arguments.of(StatementType.DELETE_MANY, FilterException.Code.INCOMPLETE_PRIMARY_KEY_FILTER), Arguments.of( - StatementType.UPDATE, + StatementType.UPDATE_ONE, FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE)); } @@ -145,7 +148,7 @@ private static Stream skip1of3ClusteringKeyTests() { FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE), Arguments.of(StatementType.DELETE_MANY, FilterException.Code.INCOMPLETE_PRIMARY_KEY_FILTER), Arguments.of( - StatementType.UPDATE, + StatementType.UPDATE_ONE, FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE)); } @@ -172,7 +175,7 @@ private static Stream skip2of3ClusteringKeyTests() { FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE), Arguments.of(StatementType.DELETE_MANY, FilterException.Code.INCOMPLETE_PRIMARY_KEY_FILTER), Arguments.of( - StatementType.UPDATE, + StatementType.UPDATE_ONE, FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE)); } @@ -199,7 +202,7 @@ private static Stream skip3of3ClusteringKeyTests() { FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE), Arguments.of(StatementType.DELETE_MANY, null), Arguments.of( - StatementType.UPDATE, + StatementType.UPDATE_ONE, FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE)); } @@ -226,7 +229,7 @@ private static Stream skip1and2of3ClusteringKeyTests() { FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE), Arguments.of(StatementType.DELETE_MANY, FilterException.Code.INCOMPLETE_PRIMARY_KEY_FILTER), Arguments.of( - StatementType.UPDATE, + StatementType.UPDATE_ONE, FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE)); } @@ -254,7 +257,7 @@ private static Stream skip2and3of3ClusteringKeyTests() { FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE), Arguments.of(StatementType.DELETE_MANY, null), Arguments.of( - StatementType.UPDATE, + StatementType.UPDATE_ONE, FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE)); } @@ -282,7 +285,7 @@ private static Stream skip1and3of3ClusteringKeyTests() { FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE), Arguments.of(StatementType.DELETE_MANY, FilterException.Code.INCOMPLETE_PRIMARY_KEY_FILTER), Arguments.of( - StatementType.UPDATE, + StatementType.UPDATE_ONE, FilterException.Code.FULL_PRIMARY_KEY_REQUIRED_FOR_UPDATE_DELETE)); } @@ -301,4 +304,27 @@ public void skip1and3of3ClusteringKey( .eqOnlyOneClusteringKey(1) .analyzeMaybeFilterError(expectedCode); } + + private static Stream inFilterUsage() { + return Stream.of( + Arguments.of(StatementType.DELETE_ONE, InTableFilter.Operator.IN), + Arguments.of(StatementType.DELETE_ONE, InTableFilter.Operator.NIN), + Arguments.of(StatementType.UPDATE_ONE, InTableFilter.Operator.IN), + Arguments.of(StatementType.UPDATE_ONE, InTableFilter.Operator.NIN)); + } + + @ParameterizedTest + @MethodSource("inFilterUsage") + public void skip1and3of3ClusteringKey( + StatementType statementType, InTableFilter.Operator inTableFilterOperator) { + + var fixture = + TEST_DATA + .whereAnalyzer() + .table2PK3Clustering1Index("in_filter_on_" + statementType.name(), statementType); + fixture + .expression() + .inOnOnePartitionKey(inTableFilterOperator) + .analyzeMaybeFilterError(FilterException.Code.INVALID_IN_FILTER_FOR_UPDATE_ONE_DELETE_ONE); + } } From 8e0d898a29bd1783b05fb061881f52b1849acafb Mon Sep 17 00:00:00 2001 From: Yuqi Du Date: Tue, 12 Nov 2024 18:18:04 -0800 Subject: [PATCH 2/3] fix tests --- .../service/operation/tables/WhereCQLClauseAnalyzer.java | 6 +----- src/main/resources/errors.yaml | 8 +++++--- .../fixtures/testdata/LogicalExpressionTestData.java | 4 ++-- .../jsonapi/fixtures/testdata/WhereAnalyzerTestData.java | 9 +++++++++ .../operation/tables/DeleteUpdateWhereAnalyzerTest.java | 9 +++++++-- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/main/java/io/stargate/sgv2/jsonapi/service/operation/tables/WhereCQLClauseAnalyzer.java b/src/main/java/io/stargate/sgv2/jsonapi/service/operation/tables/WhereCQLClauseAnalyzer.java index 1253c70ea..7a61ff617 100644 --- a/src/main/java/io/stargate/sgv2/jsonapi/service/operation/tables/WhereCQLClauseAnalyzer.java +++ b/src/main/java/io/stargate/sgv2/jsonapi/service/operation/tables/WhereCQLClauseAnalyzer.java @@ -249,11 +249,7 @@ private void checkNoInFilterUsage(Map identifierToFi var inFilterColumns = identifierToFilter.entrySet().stream() - .filter( - entry -> { - TableFilter tableFilter = entry.getValue(); - return (tableFilter instanceof InTableFilter); - }) + .filter(entry -> (entry.getValue() instanceof InTableFilter)) .map((Map.Entry::getKey)) .sorted(CQL_IDENTIFIER_COMPARATOR) .toList(); diff --git a/src/main/resources/errors.yaml b/src/main/resources/errors.yaml index 82bb0377d..392a6ba92 100644 --- a/src/main/resources/errors.yaml +++ b/src/main/resources/errors.yaml @@ -244,11 +244,13 @@ request-errors: code: INVALID_IN_FILTER_FOR_UPDATE_ONE_DELETE_ONE title: In filter is not allowed for UpdateOne and DeleteOne commands body: |- - An UpdateOne or DeleteOne command was issued with $in/$nin filter, filter columns are ${inFilterColumns}. + The command used a $in or $nin filter to select the rows the modify, however these filters can select more than one row. - $in/$nin is not allowed for UpdateOne and DeleteOne commands, since multiple rows could be affected. + Update One and Delete One commands can only modify a single rows, and so cannot use $in or $nin. - Resend the request without using $in/$nin filters. + The command used an invalid filter on the columns: ${inFilterColumns}. + + Resend the request without using the $in or $nin filter. - scope: FILTER code: NON_PRIMARY_KEY_FILTER_FOR_UPDATE_DELETE diff --git a/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/LogicalExpressionTestData.java b/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/LogicalExpressionTestData.java index 7866918aa..d757d9557 100644 --- a/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/LogicalExpressionTestData.java +++ b/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/LogicalExpressionTestData.java @@ -71,8 +71,8 @@ public FixtureT eqAllPrimaryKeys() { return eqAllClusteringKeys(); } - public FixtureT inOnOnePartitionKey(InTableFilter.Operator inFilterOperator) { - final ColumnMetadata firstPartitionKey = tableMetadata.getPartitionKey().getFirst(); + public FixtureT inOnOnePartitionKey( + InTableFilter.Operator inFilterOperator, ColumnMetadata firstPartitionKey) { if (inFilterOperator == InTableFilter.Operator.IN) { expression.addFilter(in(firstPartitionKey)); } diff --git a/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/WhereAnalyzerTestData.java b/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/WhereAnalyzerTestData.java index f6a6c9dc6..a8d9a6068 100644 --- a/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/WhereAnalyzerTestData.java +++ b/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/WhereAnalyzerTestData.java @@ -175,6 +175,15 @@ public WhereAnalyzerFixture assertExceptionOnDurationColumns(CqlIdentifier... co return assertExceptionContains(warning); } + public WhereAnalyzerFixture assertExceptionOnInFilerForUpdateOneAndDeleteOne( + CqlIdentifier... columns) { + var identifiers = Arrays.stream(columns).sorted(CQL_IDENTIFIER_COMPARATOR).toList(); + var warning = + "The command used an invalid filter on the columns: %s." + .formatted(errFmtCqlIdentifier(identifiers)); + return assertExceptionContains(warning); + } + public WhereAnalyzerFixture assertExceptionContains(String contains) { assertThat(exception) diff --git a/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java b/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java index 20bb400aa..313ef7786 100644 --- a/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java +++ b/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java @@ -1,5 +1,6 @@ package io.stargate.sgv2.jsonapi.service.operation.tables; +import com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata; import io.stargate.sgv2.jsonapi.exception.FilterException; import io.stargate.sgv2.jsonapi.fixtures.testdata.TestData; import io.stargate.sgv2.jsonapi.fixtures.testdata.TestDataNames; @@ -322,9 +323,13 @@ public void skip1and3of3ClusteringKey( TEST_DATA .whereAnalyzer() .table2PK3Clustering1Index("in_filter_on_" + statementType.name(), statementType); + final ColumnMetadata firstPartitionKey = + TEST_DATA.tableMetadata().table2PK3Clustering1Index().getPartitionKey().getFirst(); + fixture .expression() - .inOnOnePartitionKey(inTableFilterOperator) - .analyzeMaybeFilterError(FilterException.Code.INVALID_IN_FILTER_FOR_UPDATE_ONE_DELETE_ONE); + .inOnOnePartitionKey(inTableFilterOperator, firstPartitionKey) + .analyzeMaybeFilterError(FilterException.Code.INVALID_IN_FILTER_FOR_UPDATE_ONE_DELETE_ONE) + .assertExceptionOnInFilerForUpdateOneAndDeleteOne(); } } From ddc5a9adde6be354ea64215a0946c42e3b1ba9c5 Mon Sep 17 00:00:00 2001 From: Yuqi Du Date: Wed, 13 Nov 2024 09:54:32 -0800 Subject: [PATCH 3/3] fix unit tests --- .../sgv2/jsonapi/fixtures/testdata/TestDataNames.java | 2 +- .../operation/tables/DeleteUpdateWhereAnalyzerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/TestDataNames.java b/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/TestDataNames.java index b466aabaa..3a7080cc1 100644 --- a/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/TestDataNames.java +++ b/src/test/java/io/stargate/sgv2/jsonapi/fixtures/testdata/TestDataNames.java @@ -31,7 +31,7 @@ public class TestDataNames { CqlIdentifier.fromInternal("regular-2-" + System.currentTimeMillis()); public final CqlIdentifier COL_INDEXED_1 = - CqlIdentifier.fromInternal("indexed-1-" + System.currentTimeMillis()); + CqlIdentifier.fromInternal("indexed_1_" + System.currentTimeMillis()); // DO NOT ADD TO A TABLE public final CqlIdentifier COL_UNKNOWN_1 = diff --git a/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java b/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java index 313ef7786..106c37aeb 100644 --- a/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java +++ b/src/test/java/io/stargate/sgv2/jsonapi/service/operation/tables/DeleteUpdateWhereAnalyzerTest.java @@ -316,7 +316,7 @@ private static Stream inFilterUsage() { @ParameterizedTest @MethodSource("inFilterUsage") - public void skip1and3of3ClusteringKey( + public void forbidInFilterUsage( StatementType statementType, InTableFilter.Operator inTableFilterOperator) { var fixture = @@ -330,6 +330,6 @@ public void skip1and3of3ClusteringKey( .expression() .inOnOnePartitionKey(inTableFilterOperator, firstPartitionKey) .analyzeMaybeFilterError(FilterException.Code.INVALID_IN_FILTER_FOR_UPDATE_ONE_DELETE_ONE) - .assertExceptionOnInFilerForUpdateOneAndDeleteOne(); + .assertExceptionOnInFilerForUpdateOneAndDeleteOne(firstPartitionKey.getName()); } }