Skip to content

sql: support decode ExplainTreePlanNode from JSON format#68555

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
Azhng:decode-explain-tree
Aug 11, 2021
Merged

sql: support decode ExplainTreePlanNode from JSON format#68555
craig[bot] merged 1 commit intocockroachdb:masterfrom
Azhng:decode-explain-tree

Conversation

@Azhng
Copy link
Copy Markdown
Contributor

@Azhng Azhng commented Aug 6, 2021

Previously, we do not have support for decoding the
JSON-formatted ExplainTreePlanNode into the protobuf
format. This is required for us in order to implement
a crdb_internal virtual table that aggregates the cluster-wide
in-memory SQL stats and persisted SQL stats.

Related to #64743
Required for #68193

Release note: None

@Azhng Azhng requested a review from a team August 6, 2021 19:27
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Previously, we do not have support for decoding the
JSON-formatted ExplainTreePlanNode into the protobuf
format. This is required for us in order to implement
a crdb_internal virtual table that aggregates the cluster-wide
in-memory SQL stats and persisted SQL stats.

Related to cockroachdb#64743
Required for cockroachdb#68193

Release note: None
Copy link
Copy Markdown
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @Azhng)

@Azhng
Copy link
Copy Markdown
Contributor Author

Azhng commented Aug 11, 2021

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 11, 2021

Build succeeded:

@craig craig bot merged commit 26ebecb into cockroachdb:master Aug 11, 2021
craig bot pushed a commit that referenced this pull request Aug 16, 2021
68567: colrpc: enhance warnings from the outbox r=yuzefovich a=yuzefovich

This commit marks several string constants as "safe" from the
redactability perspective so that the warnings logged by the outboxes
are more helpful. Additionally, several minor nits around error
formatting are addressed.

Release note: None

68675: sql: implement IterateStatementStats() for PersistedSQLStats r=maryliag a=Azhng

Depends on: #68555, #68620
Related to: #64743

Previously, IterateStatementStats() for PersistedSQLStats was
left unimplemented and it defaults to the implementation of
SQLStats.IterateStatementStats(). This means calls to
IterateStatementStats() on PersistedSQLStats cannot read
the statement statistitcs stored in system table.

This commit implements the IterateStatementStats() through
the new CombinedStmtStatsIterator which enables this method
to read both in-memory and persited statement statistics.

Release note: None

68738: sql/catalog/dbdesc: repair old descriptors corrupted due to DROPPED SCHEMA name r=ajwerner a=sajjadrizvi

#63119 fixes a bug that corrupts a database descriptor when a child schema was 
dropped, adding an entry in schema-info structure erroneously with database name
instead of schema name . Although the bug was fixed , there can be database backups 
with corrupted descriptors.

This commit adds a post-deserialization function to repair a corrupted descriptor. Moreover,
it adds a test function to ensure that descriptors with such corruption are fixed during
migration.
 
Release note: None
 
Fixes: #63148


68903: github: redirect KV code reviews to @cockroachdb/kv-prs r=irfansharif a=irfansharif

We try to use the @cockroachdb/kv alias for notifying the entire team on
issues. There's no way to disable notifications for github's automatic
codeowners driven review requests, and that tends to be a firehose, so
lets use this sub-team alias instead.

Release note: None

68978: changefeedccl: detect sink URLs with no scheme r=HonoreDB a=stevendanna

Previously, if a user provided a sink URL with no scheme (such as
` kafka%3A%2F%2Fnope%0A`), a changefeed job would be started. However,
this changefeed job would be writing into a bufferSink.  The
bufferSink is used by core changefeeds.

The user may have provided such a URL because of confusion over how to
URL encode their sink URL.

Now, they will receive an error such as

```
pq: no scheme found for sink URL "kafka%3A%2F%2Fnope%0A"
```

Release note (enterprise change): CHANGEFEED statements now error
if the provided sink URL does not contain a scheme. Such URLs are
typically a mistake and will result in non-functional changefeeds.

Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: Azhng <archer.xn@gmail.com>
Co-authored-by: Sajjad Rizvi <sajjad@cockroachlabs.com>
Co-authored-by: irfan sharif <irfanmahmoudsharif@gmail.com>
Co-authored-by: Steven Danna <danna@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants