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

Update typecasting.md #4222

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

soerenwolfers
Copy link
Collaborator

@soerenwolfers soerenwolfers commented Dec 1, 2024

Solves duckdb/duckdb#13847 (sadly).

From what I can tell, BOOL -> INTEGERTYPES is the only example of this special type of casting?

Maybe one should get one final confirmation whether it's worth documenting this special type of cast rather than simply dropping it and gaining more PostgreSQL compatibility for it (just to reiterate: I'm all for implicit casts to programatically selected parent types, I just question the value of allowing more implicit casts in this situation than in other implicit cast situations.)

By the way: do you have the HTML for the typecasting matrix? I'd like to resolve #2791 too by adding INTEGER_LITERAL / STRING_LITERAL / NUMERIC_LITERAL to the table (at which point I'd also add the "combination cast" from bool to int to the table)

@szarnyasg
Copy link
Collaborator

IIRC the typecasting matrix was a Google Sheets sheet. I wanted to re-do it in Markdown as three column table (from, to, what type of cast is allowed) but did not get to this so far. Would you be interested in picking this up?

@soerenwolfers
Copy link
Collaborator Author

Yeah, can do. Long-format is more in the spirit of SQL too.

@soerenwolfers
Copy link
Collaborator Author

Although... are you sure you want a table with 576 entries in the docs? Maybe should that table only include positive entries? That'd be around 100.

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.

Inconsistency in the Casting Operation Matrix?
2 participants