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

fix: resolve aliased catalogs #2793

Merged
merged 4 commits into from
Mar 18, 2024
Merged

fix: resolve aliased catalogs #2793

merged 4 commits into from
Mar 18, 2024

Conversation

universalmind303
Copy link
Contributor

@universalmind303 universalmind303 commented Mar 15, 2024

closes #2779

Note for Reviewers:

There isn't a real good way that I know of to add a test for this, so i will just share the steps I took to manually test it.

  1. go to console.glaredb.com
  2. create a view in there: create view "my_view" as select 1;
  3. connect to cloud via local
> just run local
> \open glaredb://<USER>:<PASS>@o_xTz3cuY.remote.glaredb.com:6443/quiet_frog
Connected to Cloud deployment (TLS enabled): quiet_frog
> select * from "quiet_frog"."public"."my_view";
┌──────────┐
│ Int64(1) │
│       ── │
│    Int64 │
╞══════════╡
│        1 │
└──────────┘

it also works the other way around. Previously a create statement create view quiet_frog.public.my_view_2 would save it to the "default" db, now it properly saves it under the alias name

> create view "quiet_frog"."public"."my_view_2" as select 2;
View created
> select * from my_view_2;
┌──────────┐
│ Int64(2) │
│       ── │
│    Int64 │
╞══════════╡
│        2 │
└──────────┘
> select * from "quiet_frog"."public"."my_view_2";
┌──────────┐
│ Int64(2) │
│       ── │
│    Int64 │
╞══════════╡
│        2 │
└──────────┘
>

@universalmind303 universalmind303 merged commit 94d547d into main Mar 18, 2024
25 checks passed
@universalmind303 universalmind303 deleted the universalmind303/2779 branch March 18, 2024 18:58
@vrongmeal
Copy link
Contributor

Should we also restrict creating an external database with the same name as catalog alias? Seems like something that could lead to conflicts/issues with not being able to access an external source.

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.

bug: infer db name on SELECT and not just on CREATE
3 participants