Handle Boolean Edges

Fixes #11779
This commit is contained in:
Rob Bavey 2020-04-13 15:29:52 -04:00 committed by Robert Bavey
parent 2e545c75e4
commit ba7fd0cedc
2 changed files with 6 additions and 2 deletions

View file

@ -121,7 +121,11 @@ module LogStash;
edges.each do |e|
if vertex_type(e.to) == :separator
e.to.getOutgoingEdges.each do |outgoing|
edges_with_separators_removed << edge(org.logstash.config.ir.graph.PlainEdge.new(e.from, outgoing.to))
if e.java_kind_of?(org.logstash.config.ir.graph.BooleanEdge)
edges_with_separators_removed << edge(org.logstash.config.ir.graph.BooleanEdge.new(e.edgeType, e.from, outgoing.to))
else
edges_with_separators_removed << edge(org.logstash.config.ir.graph.PlainEdge.factory.make(e.from, outgoing.to))
end
end
elsif vertex_type(e.from) == :separator
# Skip the edges coming from the 'from' separator

View file

@ -10,7 +10,7 @@ describe ::LogStash::Config::LIRSerializer do
<<-EOC
input { fake_input {} }
filter {
if ([foo] > 2) {
if ([foo] < 2) {
fake_filter {}
}
}