-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
59780: opt: add exploration rules to hoist project from under join r=RaduBerinde a=RaduBerinde UPSERTs with virtual columns result in plans that can't utilize lookup joins because of a Project inside a left join. This change adds two exploration rules that try to pull up the Project, allowing other rules to fire on the resulting join. For inner joins, this is a trivial transformation (as long as the ON condition doesn't refer to a projection). For the right side of left joins (the UPSERT case), this is more complicated: we have to find a canary column from the right side. Fortunately, for the typical `a=b` join condition, `a` needs to be non-NULL, so we can use such a column as canary. Release note: None 59815: tracing: use manual collection in ForkCtxSpan r=irfansharif a=irfansharif The spans created by ForkCtxSpan are expected to outlive the parent, so automatic collection makes little sense here. It also causes the child to be linked into the parent, which can delay memory reclamation; some parent spans are effectively ephemeral. As an example of this, consider the usage in `replicaDecoder`. The parent context has a long-lived span, and forks off new tracing spans for each decoded command. Similar problems occur prop up for the `raft-worker`/`raftScheduler` goroutines. --- For tests, we make two changes: - Logic tests that asserted on async recordings are simply removed, we're making a backwards-incompatible change here - Unit tests that want to assert on trace data from async spans can now configure the tracer to include them explicitly While here, we introduce `tracing.ContextWithRecordingSpanUsing` to capture the tracer used to construct spans, so most callers can provide the one available. Release note (general change): `SHOW TRACE FOR SESSION` previously included cockroach internal traces for async threads kicked off as part of user operations. This trace data is no longer captured. 60200: sql: add tests for add/drop index with virtual columns r=RaduBerinde a=RaduBerinde Logictests for adding and dropping indexes on virtual columns and partial indexes using virtual columns in the predicate. Release notes: None Co-authored-by: Radu Berinde <[email protected]> Co-authored-by: irfan sharif <[email protected]>
- Loading branch information
Showing
39 changed files
with
1,409 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.