Skip to content

Commit

Permalink
Fix split join with :any input representation
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Oct 9, 2022
1 parent c9cd231 commit bb1c046
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/meow/ops.ex
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,18 @@ defmodule Meow.Ops do

defp common_in_representations(pipelines) do
pipelines
|> Enum.map(fn %{ops: [op | _]} -> MapSet.new(op.in_representations) end)
|> Enum.reduce(&MapSet.intersection/2)
|> MapSet.to_list()
|> Enum.map(fn pipeline -> List.first(pipeline.ops).in_representations end)
|> List.delete(:any)
|> case do
[] ->
:any

in_representations ->
in_representations
|> Enum.map(&MapSet.new/1)
|> Enum.reduce(&MapSet.intersection/2)
|> MapSet.to_list()
end
end

defp common_out_representation(pipelines) do
Expand Down

0 comments on commit bb1c046

Please sign in to comment.