-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Labels
bugSomething isn't workingSomething isn't workingplannerRelated to the query plannerRelated to the query planner
Description
PromoteValue's equality seems to be underspecified:
final var INT_42 = new LiteralValue<>(Type.primitiveType(Type.TypeCode.INT), 42);
final var p1 = PromoteValue.inject(INT_42, Type.primitiveType(Type.TypeCode.LONG));
final var p2 = PromoteValue.inject(INT_42, Type.primitiveType(Type.TypeCode.DOUBLE));p1 is deemed equal to p2 which I think is not correct, considering that each PromoteValue is promoting to a different type (one to LONG, and the other to DOUBLE).
This happens because PromoteValue does not override equalsWithoutChildren giving it a chance to take its target type into account when checking for semantic equality.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingplannerRelated to the query plannerRelated to the query planner