Skip to content

Conversation

@taniabogatsch
Copy link
Contributor

Without SQLNULL, scalar functions with ANY parameters incorrectly return INVALID as the vector's type or hit the respective assertion.

duckdb_type ConvertCPPTypeToC(const LogicalType &sql_type) {
	switch (sql_type.id()) {
	case LogicalTypeId::INVALID:
...
		return DUCKDB_TYPE_ARRAY;
	case LogicalTypeId::ANY:
		return DUCKDB_TYPE_ANY;
	default: // LCOV_EXCL_START
		D_ASSERT(0);
		return DUCKDB_TYPE_INVALID;
	} // LCOV_EXCL_STOP
}

@duckdb-draftbot duckdb-draftbot marked this pull request as draft September 18, 2024 08:06
@taniabogatsch taniabogatsch marked this pull request as ready for review September 18, 2024 08:06
@taniabogatsch
Copy link
Contributor Author

The failure is unrelated.

@Mytherin Mytherin merged commit 03976af into duckdb:main Sep 18, 2024
@Mytherin
Copy link
Collaborator

Thanks!

@taniabogatsch taniabogatsch deleted the sqlnull-in-capi branch September 18, 2024 15:22
Giorgi added a commit to Giorgi/DuckDB.NET that referenced this pull request Sep 22, 2024
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Sep 27, 2024
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Sep 27, 2024
[C API] Add SQLNULL to the duckdb types (duckdb/duckdb#13999)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
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.

2 participants