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 9384 #10267

Merged
merged 1 commit into from
Jan 18, 2024
Merged

Fix 9384 #10267

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
system catalog means no schema
  • Loading branch information
lnkuiper committed Jan 18, 2024
commit b005a7891d452e7a015aff197c65c9cd18237992
2 changes: 1 addition & 1 deletion src/planner/binder/statement/bind_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void Binder::BindLogicalType(ClientContext &context, LogicalType &type, optional
}

if (type.id() == LogicalTypeId::INVALID) {
type = Catalog::GetType(context, INVALID_CATALOG, schema, user_type_name);
type = Catalog::GetType(context, INVALID_CATALOG, INVALID_SCHEMA, user_type_name);
}
} else {
string type_catalog = UserType::GetCatalog(type);
Expand Down
25 changes: 25 additions & 0 deletions test/issues/general/test_9384.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# name: test/issues/general/test_9384.test
# description: Issue 9384: DuckDB fails when trying to add a JSON column to an existing table via ALTER TABLE
# group: [general]

require json

statement ok
create schema my_schema;

statement ok
use my_schema;

statement ok
create table t1 (i json);

statement ok
alter table t1 add column my_col json;

require inet

statement ok
create table t2 (i inet);

statement ok
alter table t2 add column my_col inet;
Loading