Skip to content

Conversation

@HuaHuaY
Copy link
Contributor

@HuaHuaY HuaHuaY commented Nov 7, 2022

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

  1. Implement information_schema. And add information_schema.columns. columns contains columns in table, materialized view(except internal tables) and system table.
  2. Modify the logic of searching system catalog of frontend. Use table_id instead of table_name.

TODO

  1. If we want to add more column in information_schema.columns, we may need to modify the type system of RisingWave.
  2. Add views' columns to information_schema.columns.
  3. Need to judge the user permissions related to information_schema, I will check it later.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove those that do not apply.

  • SQL commands, functions, and operators

Release note

  1. add information_schema(PostgreSQL's doc: https://www.postgresql.org/docs/current/information-schema.html).
    The information schema consists of a set of views that contain information about the objects defined in the current database.
  2. add information_schema.columns(PostgreSQL's doc: https://www.postgresql.org/docs/current/infoschema-columns.html).
    The view columns contains information about all table columns (or view columns) in the database. System columns (ctid, etc.) are not included. Only those columns are shown that the current user has access to (by way of being the owner or having some privilege). In RisingWave, columns also contains all materialized views' columns.

Refer to a related PR or issue link (optional)

relate #6149

@github-actions github-actions bot added the type/feature Type: New feature. label Nov 7, 2022
Copy link
Contributor

@BowenXiao1999 BowenXiao1999 left a comment

Choose a reason for hiding this comment

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

LGTM! Great Job.

We can replace Describe t; next

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

Good job!!I LGTM.

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

LGTM~

@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Merging #6227 (ad35e79) into main (df0c3f4) will increase coverage by 0.38%.
The diff coverage is 73.36%.

@@            Coverage Diff             @@
##             main    #6227      +/-   ##
==========================================
+ Coverage   74.18%   74.57%   +0.38%     
==========================================
  Files         944      945       +1     
  Lines      152310   152769     +459     
==========================================
+ Hits       112992   113923     +931     
+ Misses      39318    38846     -472     
Flag Coverage Δ
rust 74.57% <73.36%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/batch/src/execution/local_exchange.rs 56.84% <0.00%> (ø)
src/batch/src/executor/sys_row_seq_scan.rs 0.00% <0.00%> (ø)
src/common/src/catalog/mod.rs 71.42% <ø> (ø)
src/common/src/config.rs 70.41% <ø> (ø)
src/compute/src/rpc/service/exchange_service.rs 0.00% <0.00%> (ø)
src/frontend/src/binder/select.rs 94.56% <ø> (ø)
src/frontend/src/catalog/mod.rs 75.67% <ø> (ø)
src/frontend/src/catalog/schema_catalog.rs 76.95% <0.00%> (-1.19%) ⬇️
...c/catalog/system_catalog/information_schema/mod.rs 0.00% <0.00%> (ø)
...ntend/src/catalog/system_catalog/pg_catalog/mod.rs 0.00% <0.00%> (ø)
... and 82 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mergify mergify bot merged commit 0902564 into main Nov 7, 2022
@mergify mergify bot deleted the zehua/information_schema_columns branch November 7, 2022 13:18
@yezizp2012 yezizp2012 added the user-facing-changes Contains changes that are visible to users label Nov 7, 2022
@yezizp2012
Copy link
Member

Please add some description about the Types of user-facing changes and Release Note in this PR, so that the document team can update the details of use-facing changes in the docs. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature Type: New feature. user-facing-changes Contains changes that are visible to users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants