Skip to content

Commit

Permalink
docs: Apply suggestions from code review to concat documentation
Browse files Browse the repository at this point in the history
Co-authored-by: Lukáš Petrovický <lukas@petrovicky.net>
  • Loading branch information
Christopher-Chianelli and triceo authored Oct 11, 2023
1 parent 6c5d814 commit 61521ac
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1516,9 +1516,9 @@ See <<constraintStreamsDealingWithDuplicateTuplesUsingDistinct,`distinct()`>> fo

Concat allows you to create a constraint stream containing tuples of two constraint streams of the same <<constraintStreamsCardinality,cardinality>>.
If <<constraintStreamsJoin,join>> acts like a cartesian product of two lists, concat acts like a concatenation of two lists.
Unlike union of sets, concatenation of lists repeat duplicated elements.
Unlike union of sets, concatenation of lists repeats duplicated elements.
If the two constraint stream parents share tuples, they will be repeated downstream.
If this is undesired, use <<constraintStreamsDealingWithDuplicateTuplesUsingDistinct,distinct>>.
If this is undesired, use the <<constraintStreamsDealingWithDuplicateTuplesUsingDistinct,`distinct` building block>>.

image::constraints-and-score/constraintStreamConcat.png[align="center"]

Expand All @@ -1537,7 +1537,7 @@ For example, to count the total number of cats and dogs:
}
----

This correctly count cats and dogs when an Employee has both a cat and a dog.
This correctly counts cats and dogs when an Employee has both a cat and a dog.
If it was implemented with a filter like this:

[source,java,options="nowrap"]
Expand Down

0 comments on commit 61521ac

Please sign in to comment.