Skip to content

Commit

Permalink
Minor clean up on #1698 fix based on code review comments (#1805)
Browse files Browse the repository at this point in the history
  • Loading branch information
tatu-at-datastax authored Jan 2, 2025
1 parent 0269372 commit 7c3d330
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.stargate.sgv2.jsonapi.api.model.command.table.definition.ColumnsDescContainer;
import io.stargate.sgv2.jsonapi.service.cqldriver.executor.TableSchemaObject;
import io.stargate.sgv2.jsonapi.service.operation.InsertAttempt;
import io.stargate.sgv2.jsonapi.service.schema.tables.ApiSupportDef;
import io.stargate.sgv2.jsonapi.service.shredding.DocRowIdentifer;
import io.stargate.sgv2.jsonapi.service.shredding.tables.RowId;
import io.stargate.sgv2.jsonapi.service.shredding.tables.WriteableTableRow;
Expand Down Expand Up @@ -45,7 +44,7 @@ public Optional<ColumnsDescContainer> schemaDescription() {
return Optional.empty();
}
var apiColumns = schemaObject.apiTableDef().primaryKeys();
var unsupported = apiColumns.filterBySupport(ApiSupportDef::isUnsupportedInsert);
var unsupported = apiColumns.filterBySupport(x -> !x.insert());
if (!unsupported.isEmpty()) {
throw new IllegalStateException("Unsupported columns primary key: %s" + unsupported);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ default boolean isUnsupportedDML() {
return !insert() || !read() || !filter();
}

default boolean isUnsupportedInsert() {
return !insert();
}

/**
* Helper record to be used when the support can be determined at compile time, or easily cached.
*/
Expand Down

0 comments on commit 7c3d330

Please sign in to comment.