Skip to content

Commit

Permalink
The incorrect NodeInfo is created when the optional parameter is not …
Browse files Browse the repository at this point in the history
…used, leading to the incorrect constructor being used.

Fixes elastic#32554
  • Loading branch information
astefan committed Aug 2, 2018
1 parent 5efc2ec commit 98bf256
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public final void collectFields(SqlSourceBuilder sourceBuilder) {

@Override
protected NodeInfo<LocateFunctionProcessorDefinition> info() {
if (start == null) {
return NodeInfo.create(this, LocateFunctionProcessorDefinition::new, expression(), pattern, source);
}

return NodeInfo.create(this, LocateFunctionProcessorDefinition::new, expression(), pattern, source, start);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public static LocateFunctionProcessorDefinition randomLocateFunctionProcessorDef
.makeProcessorDefinition());
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/32554")
@Override
public void testTransform() {
// test transforming only the properties (location, expression),
Expand Down

0 comments on commit 98bf256

Please sign in to comment.