cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.13k stars 3.81k forks source link

sql: consider making walk machinery walk the entire expression tree #126731

Open DrewKimball opened 4 months ago

DrewKimball commented 4 months ago

Currently, tree.WalkExpr is not guaranteed to walk all nodes in a given expression tree. This is confusing and has led to bugs in the past, and also limits the usability of the logic. We should consider changing this. See also https://github.com/cockroachdb/cockroach/blob/6478524d42031106c5f0cc484a832ca9383fc6d1/pkg/sql/sem/tree/walk.go#L827-L832

Jira issue: CRDB-40093

michae2 commented 4 months ago

[triage] this is surprising, and seems tractable. maybe we just need to schedule the work? or address this next time it blocks feature work.