Open mgartner opened 2 years ago
We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!
A cast from
INTERVAL
toSTRING
is labelled as composite insensitive. You can see this by adding this test topkg/sql/opt/memo/testdata/composite_sensitive
:I believe this is incorrect because
INTERVAL
is a composite type, even though we don't mark it as such: https://github.com/cockroachdb/cockroach/blob/c1754fbf824a1a885c2cff2473b474c9479aca61/pkg/sql/catalog/colinfo/column_type_properties.go#L65-L84Notice that an equal interval can present itself in different ways, making it composite:
Marking an expression as composite insensitive when it is not actually composite insensitive can cause correctness bugs. I don't have an example of a correctness bug caused by this at the moment, but I have a strong feeling that one exists.
Jira issue: CRDB-15403
Epic: CRDB-20062