Skip to content

Commit

Permalink
Fix modifier hint attribute lookup bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
marikomedlock committed Jul 26, 2023
1 parent adf51a1 commit 5f33378
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public EntityHintResult listEntityHints(EntityHintRequest entityHintRequest) {

String attrName =
rowResult.get(MODIFIER_AUX_DATA_ATTR_COL).getLiteral().orElseThrow().getStringVal();
Attribute attr = entityHintRequest.getAttribute(attrName);
Attribute attr = entityHintRequest.getEntity().getAttribute(attrName);

OptionalDouble min = rowResult.get(MODIFIER_AUX_DATA_MIN_COL).getDouble();
if (min.isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ public Entity getEntity() {
return entity;
}

public Attribute getAttribute(String attributeName) {
return isEntityLevelHints()
? entity.getAttribute(attributeName)
: relatedEntity.getAttribute(attributeName);
}

public Underlay.MappingType getMappingType() {
// Hints always hit the index dataset.
return Underlay.MappingType.INDEX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void assertHintsMatch(
EntityHintResult entityHintResult = querysService.listEntityHints(entityHintRequest);

for (Map.Entry<String, DisplayHint> expected : expectedHints.entrySet()) {
Attribute attr = entityHintRequest.getAttribute(expected.getKey());
Attribute attr = entityHintRequest.getEntity().getAttribute(expected.getKey());
DisplayHint actual = entityHintResult.getHintMap().get(attr);
assertEquals(expected.getValue(), actual);
}
Expand Down

0 comments on commit 5f33378

Please sign in to comment.