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

edit: add schema id, schema name, catalog name in TableData #1294

Merged
merged 9 commits into from
Nov 21, 2023

Conversation

dust1
Copy link
Contributor

@dust1 dust1 commented Nov 5, 2023

Rationale

Closes #1157

To be able to get the catalog from the table

Detailed Changes

I added the schema id, schema name, catalog name to MetaEditRequest for passing them to TableData, but because MetaEdit involves passing the protoc protocol, I don't save them here.

Test Plan

pass

@Rachelint
Copy link
Contributor

Rachelint commented Nov 7, 2023

Actually, schema and table schema are not the same things although with a same name... This confused me at the beginning, too.Schema can be seemed as something like tenant, database. We don't have detailed design about How to create schema and Where to store the schema now...

This is my current idea for the issue:

  • Now schema id is sent to datanode through CreateTableRequest and OpenTableRequest , we just use it and don't need to care persistence of it currently.
  • Just simply place it into LoadRequest and MetaEditRequest, and then place it into TableData.
  • We can skip things about catalog, we plan to just use default catalog after discussing.

@dust1
Copy link
Contributor Author

dust1 commented Nov 7, 2023

Ok, let me revise it

@dust1 dust1 marked this pull request as ready for review November 11, 2023 13:23
@dust1 dust1 changed the title edit: add catalog_name in AddTableMeta edit: add schema_id in TableData Nov 12, 2023
@dust1 dust1 requested a review from Rachelint November 15, 2023 11:11
@Rachelint
Copy link
Contributor

I see this pr has conflicts with main branch now, let me solve it?

@dust1
Copy link
Contributor Author

dust1 commented Nov 15, 2023

Just a moment, please. I'll sort it out😂

@Rachelint
Copy link
Contributor

Rachelint commented Nov 15, 2023

See codes again, and I found schema_name and catalog_name may be needed too currently for the final target about expose schema_name and catalog_name through Table interface...
Can please help to add thems with schema_id together in this pr...?

@dust1
Copy link
Contributor Author

dust1 commented Nov 15, 2023

sure!

@dust1 dust1 changed the title edit: add schema_id in TableData edit: add schema id, schema name, catalog name in TableData Nov 17, 2023
Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

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

LGTM

@Rachelint
Copy link
Contributor

Thanks @dust1 .

@Rachelint Rachelint merged commit b6a1654 into apache:main Nov 21, 2023
7 checks passed
@dust1 dust1 deleted the issue1157 branch November 21, 2023 05:46
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.

Enable to get schema and catalog information from table
2 participants