-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Critical - P2
-
None
-
Affects Version/s: 3.4.1
-
Component/s: Querying
-
Query Optimization
-
(copied to CRM)
Currently when collation is not explicitly specified in the createView command, we create the view with default collation (if it's on top of a collection) or error (if it's on top of a view).
Neither of these is very user friendly - when creating a view on top of a view, you should not need to explicitly specify identical collation to allow view definition to succeed - it should do the "logical" thing if collation is omitted - the only allowed behavior, which is to insert identical collation from the underlying view.
For view on a collection, I would argue that the default behavior should be the same - if explicit collation is not specified, it is extremely unlikely (nearly impossible) that what the user wants is "simple" collation, if the underlying collection has some other collation explicitly defined.
Therefore explicitly inserting collation of the underlying entity is the correct behavior.
I would suggest that already created views should of course retain their currently present behavior/attribute/collations, i.e. they will replicate exactly as they are, but newly created views will cause an explicit collation to be inserted in the entry for creating this view.
- is related to
-
SERVER-55653 Queries on time-series views do not accept collations on indexes
- Closed
- related to
-
SERVER-35314 Allow changing default collation for a collection
- Backlog