New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-2.1: assorted SQL telemetry fixes #31357

Merged
merged 5 commits into from Oct 15, 2018

Conversation

4 participants
@knz
Member

knz commented Oct 15, 2018

Backport:

  • 1/1 commits from "sql/parser: annotate unimplemented features with suitable errors" (#31335)
  • 2/2 commits from "sql,telemetry: fold unimplemented/error telemetry into feature counters" (#31356)
  • 3/3 commits from "sql: report unimplemented vtables in telemetry" (#31332)
  • 1/1 commits from "pgerror: hint what to do upon encountering unimplemented errors" (#31333)

Please see individual PRs for details.

/cc @cockroachdb/release

knz added some commits Oct 13, 2018

telemetry: minor optimization
Release note: None
sql/parser: annotate unimplemented features with suitable errors
This patch recognizes more syntax from PostgreSQL for the purpose of
reporting more fine grained "unimplemented feature" errors.

- new:
  - CREATE/DROP
    AGGREGATE / CAST / COLLATION / CONVERSION / DOMAIN / EXTENSION /
    FOREIGN TABLE / FOREIGN DATA (WRAPPER) / FUNCTION / LANGUAGE /
    OPERATOR / PUBLICATION / RULE / SERVER / SUBSCRIPTION /
    TEXT (SEARCH) / TRIGGER / MATERIALIZED VIEW.
  - CREATE OR REPLACE VIEW
  - CREATE RECURSIVE VIEW
  - CREATE TEMP TABLE / VIEW / SEQUENCE and variants
  - CREATE INDEX USING GIST / HASH / SPGIST / BRIN
  - CREATE INDEX ... WHERE ... (partial indexes)
  - CREATE INDEX ON ... (<complex expr>)   (computed indexes)
  - CREATE GROUP is really an alias for CREATE USER and is not "unsupported"
  - type names point/circle/etc   (unsupported pg data types)
  - INTERVAL SECONDS / MINUTES / etc  (interval type with unit qualifier)
  - SELECT .. FOR UPDATE (and other locks)
  - Geometric types: POINT, CIRCLE etc
  - Other predefined pg types: XML, MACADDR, etc
  - Full text search: CREATE TEXT SEARCH, types TSVECTOR, TSQUERY, etc

- modified:
  - COMMENT ON accounting split in "table", "column" and other
  - TIMETZ support accounting split in "data type" and "current_time"
  - WITH RECURSIVE gets an issue number

Additionally unimplemented feature errors that stem during parsing
will now be prefixed with `syntax.` to ease integration in the feature
count hierarchy.

Release note: None

@knz knz requested review from dt, jordanlewis and BramGruneir Oct 15, 2018

@knz knz added this to Triage in SQL Front-end, Lang & Semantics via automation Oct 15, 2018

@knz knz requested a review from awoods187 Oct 15, 2018

@knz knz requested review from cockroachdb/core-prs as code owners Oct 15, 2018

@cockroach-teamcity

This comment has been minimized.

Show comment
Hide comment
@cockroach-teamcity

cockroach-teamcity Oct 15, 2018

Member

This change is Reviewable

Member

cockroach-teamcity commented Oct 15, 2018

This change is Reviewable

@knz knz moved this from Triage to Current milestone in SQL Front-end, Lang & Semantics Oct 15, 2018

@BramGruneir

:lgtm:

Reviewed 6 of 9 files at r1, 6 of 7 files at r3, 5 of 5 files at r4, 3 of 3 files at r5.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

knz added some commits Oct 13, 2018

sql: fold unimplemented/error telemetry into feature counters
This was discussed with @dt: use the feature counter machinery
instead of using separate maps. This simplifies the code.

Release note: None
sql: report unimplemented vtables in telemetry
Release note (sql change): CockroachDB will now collect references to
tables in `information_schema` and `pg_catalog` which are not yet
implemented, and report them as telemetry if statistics reporting is
enabled. This will help determine which features should be implemented
next for compatibility.
pgerror: hint what to do upon encountering unimplemented errors
Before:

```
root@127.0.0.1:28070/defaultdb> select * from information_schema.view_table_usage;
pq: virtual schema table not implemented: information_schema.view_table_usage
```

After:

```
root@127.0.0.1:28070/defaultdb> select * from information_schema.view_table_usage;
pq: virtual schema table not implemented: information_schema.view_table_usage
HINT: This feature is not yet implemented in CockroachDB.

Please check https://github.com/cockroachdb/cockroach/issues to check
whether this feature is already tracked. If you cannot find it there,
please report this error with example query at:

    https://github.com/cockroachdb/cockroach/issues/new/choose

If you would rather not post publicly, please contact us directly at:

    support@cockroachlabs.com

The Cockroach Labs team appreciates your feedback.
```

Release note: None
@knz

This comment has been minimized.

Show comment
Hide comment
@knz

knz Oct 15, 2018

Member

@dt I would enjoy another cursory look at this from you before this gets merged

Member

knz commented Oct 15, 2018

@dt I would enjoy another cursory look at this from you before this gets merged

@knz

This comment has been minimized.

Show comment
Hide comment
@knz

knz Oct 15, 2018

Member
Member

knz commented Oct 15, 2018

@dt

dt approved these changes Oct 15, 2018

@dt dt merged commit 429569b into cockroachdb:release-2.1 Oct 15, 2018

2 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
license/cla Contributor License Agreement is signed.
Details

@knz knz deleted the knz:backport2.1-31335-31356-31332-31333 branch Oct 15, 2018

@knz knz moved this from Current milestone to Finished (milestone r2.1) in SQL Front-end, Lang & Semantics Oct 15, 2018

@RaduBerinde RaduBerinde referenced this pull request Oct 15, 2018

Open

release: v2.1.0-rc.1 #31359

3 of 16 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment