-
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.
49816: sql: add support for ANALYZE <tablename> r=rytaft a=rytaft This commit adds support for `ANALYZE <tablename>` by adding the statement as syntactic sugar for the equivalent command `CREATE STATISTICS "" FROM <tablename>`. This improves compatibility with Postgres, and is needed to run the PostGIS tutorial as written. Note that this commit does not add support for `ANALYZE` without a table name. We can add support for that and other variants later if needed, but it is not necessary for the PostGIS tutorial. Fixes #49214 Release note (sql change): Added support for `ANALYZE <tablename>`, which causes the database to collect statistics on the given table for use by the optimizer. The functionality of this command is equivalent to the existing command `CREATE STATISTICS "" FROM <tablename>`, but it increases compatibility with Postgres by using the same syntax that Postgres uses. 49837: docs: enhance the contributor guide r=otan a=knz The contributor guide only contained a URL to the wiki, and was missing searchable keywords. This patch adds that, as well as a link to the community slack. Release note: None Co-authored-by: Rebecca Taft <becca@cockroachlabs.com> Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
- Loading branch information
Showing
12 changed files
with
168 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
# Contributing to Cockroach | ||
|
||
Our contributor guidelines are available on the public wiki here: | ||
https://wiki.crdb.io/wiki/spaces/CRDB/pages/73204033/Contributing+to+CockroachDB | ||
Our contributor guidelines are available on [the public wiki at | ||
**wiki.crdb.io**](https://wiki.crdb.io/wiki/spaces/CRDB/pages/73204033/Contributing+to+CockroachDB). | ||
|
||
At this location, we share our team guidelines and knowledge base | ||
regarding: | ||
|
||
- repository layout | ||
- how to build from source | ||
- how to organize your code change | ||
- commenting guidelines | ||
- commit message guidelines | ||
- code style guidelines | ||
- how to write and run tests | ||
- how to write release notes | ||
- how to submit a change for review | ||
- how to use continuous integration (CI) | ||
- how to troubleshoot certain issues | ||
|
||
as well as many other practical topics. | ||
|
||
If you have any questions, hop into our [CockroachDB Community | ||
Slack](https://cockroa.ch/slack), in particular the **#contributors** | ||
channel where you can ask questions to the CockroachDB team directly. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2020 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package tree | ||
|
||
// Analyze represents an ANALYZE statement. | ||
type Analyze struct { | ||
Table TableExpr | ||
} | ||
|
||
// Format implements the NodeFormatter interface. | ||
func (node *Analyze) Format(ctx *FmtCtx) { | ||
ctx.WriteString("ANALYZE ") | ||
ctx.FormatNode(node.Table) | ||
} |
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