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

Implement tables.list rpc endpoint #3599

Merged
merged 10 commits into from
May 27, 2024
Merged

Conversation

Anish9901
Copy link
Member

@Anish9901 Anish9901 commented May 17, 2024

Fixes #3600

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@Anish9901 Anish9901 changed the base branch from develop to architectural_overhaul May 17, 2024 10:47
@Anish9901 Anish9901 marked this pull request as ready for review May 21, 2024 12:05
@Anish9901 Anish9901 added the pr-status: review A PR awaiting review label May 21, 2024
@Anish9901 Anish9901 changed the title Tables list rpc endpoint Implement tables.list rpc endpoint May 21, 2024
@Anish9901
Copy link
Member Author

@mathemancer, @seancolsen As of now the tables.list endpoint returns the schema oid with each table_info json blob, however, it is debatable whether or not we want to have that, astables.list_ filters tables based on a schema oid rather than database id. In other words, we already have the schema oid that will be returned in each json object returned by tables.list endpoint. Any thoughts about whether or not we want to include schema oid in each json object?

@seancolsen
Copy link
Contributor

@Anish9901

whether or not we want to include schema oid in each json object?

Good question. I would lean towards keeping it. I don't see much harm in having it there. And the data structures in the front end do actually appear to use that property as returned from the REST API. It's possible it would be easy to refactor that stuff out of the front end. But it would take me some time to investigate deeply enough to form a definitive answer.

Copy link
Contributor

@mathemancer mathemancer left a comment

Choose a reason for hiding this comment

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

I noticed one detail that we should discuss, but I prefer merging this and then fixing it once we've decided on the convention to use.

schema: The `oid` of the schema where the table lives.
description: The description of the table.
"""
oid: int
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm okay with this, but we should chat at some point with @seancolsen about preferences w.r.t. specific ID names instead of just id in this type of case. I went with id rather than attnum for column info, for example. I don't really have a strong preference, but we should choose one way and stick with it.

Copy link
Contributor

Choose a reason for hiding this comment

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

As I'm looking at this more, I think id is more consistent with referring to the schema and using its (o)id.

Copy link
Contributor

Choose a reason for hiding this comment

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

I added this as a topic for discussion at our technical beta planning meeting.

@mathemancer mathemancer merged commit bb111fc into architectural_overhaul May 27, 2024
34 checks passed
@mathemancer mathemancer deleted the tables_list branch May 27, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: review A PR awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants