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

SQL casts unwrap instead of hooking into error handling system #237

Open
mwylde opened this issue Aug 8, 2023 · 0 comments
Open

SQL casts unwrap instead of hooking into error handling system #237

mwylde opened this issue Aug 8, 2023 · 0 comments
Labels
enhancement New feature or request sql Related to the DataFusion SQL integration ux

Comments

@mwylde
Copy link
Member

mwylde commented Aug 8, 2023

Our SQL cast expressions currently deal with errors by unwrapping:

parse_str(&StructField::data_type_name(output_type)).unwrap();

Causing an error on invalid cast is inline with the behavior of postgres, however we should find a way to hook into the error-reporting system to let the user know why the job failed. We may also want to support something like try_cast that attempts to cast and returns null if it fails.

@mwylde mwylde added enhancement New feature or request sql Related to the DataFusion SQL integration ux labels Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sql Related to the DataFusion SQL integration ux
Projects
None yet
Development

No branches or pull requests

1 participant