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

feat: add get_indexes #18

Merged
merged 2 commits into from
Feb 3, 2023
Merged

feat: add get_indexes #18

merged 2 commits into from
Feb 3, 2023

Conversation

HuaHuaY
Copy link
Contributor

@HuaHuaY HuaHuaY commented Nov 28, 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, Well Done!

But I'm not sure whether Superset will use this get_indexes API...

sqlalchemy_risingwave/base.py Outdated Show resolved Hide resolved
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

Comment on lines +39 to +40
assert indexes[0]["name"] == "three_columns_idx"
assert indexes[0]["column_names"] == ["id2", "id1"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get pk of this index?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now we can't. We have the ability to add and use indnkeyatts column in pg_index. The value of indnkeyatts means that how many keys in front of indkey are pk. We can support getting pk when we need it.

@BowenXiao1999 BowenXiao1999 merged commit 7467dc7 into main Feb 3, 2023
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.

Fill in get_indexes
2 participants