The spec should clarify if container types can be compared outside of ORDER BY contexts (e.g. <, >, <=, >=, MAX, MIN, COLL_MAX, COLL_MIN).
The Kotlin implementation currently allows such comparisons but perhaps we should disallow (unless there's a good reason to allow it). There are some potential issues with allowing comparison of container types:
If type system is not closed, the ordering may not be stable
The spec mentions the total ordering behavior related to
ORDER BY
clauses. For example:The spec should clarify if container types can be compared outside of
ORDER BY
contexts (e.g.<
,>
,<=
,>=
,MAX
,MIN
,COLL_MAX
,COLL_MIN
).The Kotlin implementation currently allows such comparisons but perhaps we should disallow (unless there's a good reason to allow it). There are some potential issues with allowing comparison of container types: