Skip to content

Commit

Permalink
Fix error on graph field check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Hafner committed Jan 3, 2025
1 parent c8768c4 commit fffe62e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.polypheny.db.type.PolyType;
import org.polypheny.db.type.PolyTypeFactoryImpl;
import org.polypheny.db.type.entity.PolyString;
import org.polypheny.db.type.entity.PolyValue;
import org.polypheny.db.type.entity.document.PolyDocument;
import org.polypheny.db.type.entity.numerical.PolyLong;

Expand Down Expand Up @@ -121,7 +122,9 @@ public static void throwIfContainsIdentifierKey( LogicalLpgModify lpgModify ) {
.flatMap(o -> o.get().getOperands().stream())
.map(r -> r.unwrap( RexLiteral.class))
.filter(Optional::isPresent)
.anyMatch(r -> IdentifierUtils.IDENTIFIER_KEY.equals(r.get().getValue().asString().getValue()));
.map(v -> v.get().getValue())
.filter( PolyValue::isString )
.anyMatch(s -> IdentifierUtils.IDENTIFIER_KEY.equals(s.asString().getValue()));
if (!modifiesIdentifier) {
return;
}
Expand Down

0 comments on commit fffe62e

Please sign in to comment.