Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Dtenwolde
Copy link
Contributor

@Dtenwolde Dtenwolde commented Jul 21, 2025

Fixes https://github.com/duckdblabs/duckdb-internal/issues/5185

Previously user defined types could not have a schema defined and array bounds which was a small oversight in the parser. I updated some tests to reflect this change.

Only question is related to user types from different catalogs which give a confusing error (Perhaps best tackled in a separate issue if deemed serious enough)

attach ':memory:' as db2;
create schema db2.schema3;

create type db2.schema3.bar as BOOL; -- current catalog is memory, but this type is created in db2.schema3
create table C (
	vis db2.schema3.bar[]
); -- Create a table in memory with a usertype from catalog db2

This returns:

Catalog Error:
Type with name bar does not exist!
Did you mean "db2.schema3.bar"?

I also commented out D_ASSERT(count == static_cast<size_t>(std::pow(2, neighbors.size()) - 1)); because it caused tests to fail but seems unrelated (see https://github.com/duckdblabs/duckdb-internal/issues/5342). I'll wait for #18344 to be merged and remove the commented code

@duckdb-draftbot duckdb-draftbot marked this pull request as draft July 21, 2025 10:42
@Dtenwolde Dtenwolde marked this pull request as ready for review July 21, 2025 10:43
@Dtenwolde
Copy link
Contributor Author

Dtenwolde commented Jul 21, 2025

The failing test seems unrelated, but I don't know why it happens. I'll look into it

@duckdb-draftbot duckdb-draftbot marked this pull request as draft July 23, 2025 07:35
@Dtenwolde Dtenwolde marked this pull request as ready for review July 23, 2025 12:17
@duckdb-draftbot duckdb-draftbot marked this pull request as draft July 28, 2025 10:35
@Dtenwolde Dtenwolde marked this pull request as ready for review August 4, 2025 13:46
@hannes
Copy link
Member

hannes commented Aug 11, 2025

@Dtenwolde can you re-generate the parser for this PR please?

# Conflicts:
#	third_party/libpg_query/src_backend_parser_gram.cpp
@duckdb-draftbot duckdb-draftbot marked this pull request as draft August 11, 2025 11:03
@hannes hannes marked this pull request as ready for review August 11, 2025 11:06
@duckdb-draftbot duckdb-draftbot marked this pull request as draft August 12, 2025 13:57
@hannes hannes marked this pull request as ready for review August 13, 2025 11:26
@hannes hannes removed the CI Failure label Aug 13, 2025
@duckdb-draftbot duckdb-draftbot marked this pull request as draft August 27, 2025 07:47
@Dtenwolde Dtenwolde marked this pull request as ready for review August 28, 2025 08:32
@hannes
Copy link
Member

hannes commented Aug 31, 2025

another merge and parser-regenerate please

@duckdb-draftbot duckdb-draftbot marked this pull request as draft September 2, 2025 08:56
@Dtenwolde Dtenwolde marked this pull request as ready for review September 2, 2025 08:56
@duckdb-draftbot duckdb-draftbot marked this pull request as draft September 3, 2025 10:33
@Dtenwolde Dtenwolde marked this pull request as ready for review September 3, 2025 10:33
@Dtenwolde Dtenwolde marked this pull request as draft September 3, 2025 13:10
@Dtenwolde Dtenwolde marked this pull request as ready for review September 3, 2025 13:11
@duckdb-draftbot duckdb-draftbot marked this pull request as draft September 3, 2025 13:12
@Dtenwolde Dtenwolde marked this pull request as ready for review September 3, 2025 13:40
@Mytherin Mytherin merged commit f15fddd into duckdb:main Sep 10, 2025
130 of 171 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Sep 10, 2025
Allow user type with schema defined to have array bounds (duckdb/duckdb#18342)
Issue template: Add the Python repository (duckdb/duckdb#18928)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Sep 10, 2025
Allow user type with schema defined to have array bounds (duckdb/duckdb#18342)
Issue template: Add the Python repository (duckdb/duckdb#18928)

Co-authored-by: krlmlr <[email protected]>
@Dtenwolde Dtenwolde deleted the array-qualified-name branch October 7, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants