Skip to content
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

Support Dictionary::GLUE_OBJECTS to serve OBJECT_TYPE, CREATED metadata #924

Merged
merged 15 commits into from
Oct 27, 2022

Conversation

devgony
Copy link
Collaborator

@devgony devgony commented Oct 11, 2022

Goal

1. GLUE_OBJECTS

gluesql> CREATE TABLE FOO(no int, name text);
gluesql> CREATE INDEX FOO_no on FOO (no);
gluesql> CREATE INDEX FOO_name on FOO (name);
gluesql> SELECT * FROM GLUE_OBJECTS;
OBJECT_NAME OBJECT_TYPE CREATED
FOO TABLE 2022-10-26 16:15:13.631594300
FOO_no INDEX 2022-10-26 16:15:31.545284911
FOO_name INDEX 2022-10-26 16:15:39.437689053

2. link SHOW INDEXES to GLUE_INDEXES

gluesql> SHOW INDEXES FROM FOO;
TABLE_NAME INDEX_NAME ORDER EXPRESSION UNIQUENESS
FOO FOO_no BOTH no FALSE
FOO FOO_name BOTH name FALSE

Todo

  • implement GLUE_OBJECTS
  • add created to Schema, SchemaIndex
  • implement TABLE created
  • implement INDEX created
  • move test to dictionary_index

Next

  • add last_ddl_time to Schema, SchemaIndex
  • how to test timestamp like created or last_ddl_time without failure? => cover with where clause
  • implement mutation of last_ddl_time on each DDL executions

@devgony devgony self-assigned this Oct 11, 2022
@coveralls
Copy link

coveralls commented Oct 11, 2022

Pull Request Test Coverage Report for Build 3330698036

  • 98 of 98 (100.0%) changed or added relevant lines in 8 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 97.897%

Files with Coverage Reduction New Missed Lines %
core/src/executor/context/filter_context.rs 4 93.44%
Totals Coverage Status
Change from base Build 3306811139: 0.06%
Covered Lines: 38256
Relevant Lines: 39078

💛 - Coveralls

@devgony devgony added the enhancement New feature or request label Oct 11, 2022
@devgony devgony force-pushed the dictionary/glue_objects branch from 8cd967d to ae34e51 Compare October 22, 2022 05:35
@devgony devgony force-pushed the dictionary/glue_objects branch from ae34e51 to 790cbb0 Compare October 25, 2022 05:54
@devgony devgony requested review from panarch and ever0de and removed request for panarch October 25, 2022 05:55
@devgony devgony marked this pull request as ready for review October 25, 2022 05:55
@devgony devgony changed the title [Dictionary] support GLUE_OBJECTS Support Dictionary::GLUE_OBJECTS to serve OBJECT_TYPE, CREATED metadata Oct 25, 2022
@devgony devgony requested a review from panarch October 25, 2022 05:56
Copy link
Member

@panarch panarch left a comment

Choose a reason for hiding this comment

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

Now both SHOW INDEXES .. and SELECT * FROM GLUE_INDEXES.. have same behavior.
Looks all great!
Thanks a lot 👍 👍 👍

@panarch panarch merged commit 9fb4d04 into gluesql:main Oct 27, 2022
devgony added a commit to devgony/gluesql that referenced this pull request Oct 29, 2022
…luesql#924)

Add `Dictionary::GLUE_OBJECTS` which provides table and index metadata in the entire database.
Support Dictionary::`GLUE_OBJECTS` to serve OBJECT_TYPE, CREATED metadata
Add `created` datetime field to `Schema` and `SchemaIndex`
Change SHOW INDEXES query to use `GLUE_INDEXES`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants