Duplicate keys can be created in several ways: Tables can be created with duplicate keys, alternate indexes can generate duplicate keys, and a change to an existing table definition can generate duplicate keys.
The duplicate key will be inserted in the table as a group. The group of duplicate keys will be sorted into the correct location in the table.
While all rows will be returned in order by key, if the table is processed by GN processing, there is no guarantee for the order of rows within the group of duplicate keys.