-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Can not use NULLs in INSERT VALUES #4912
Comments
I've found you can use the
|
fixes: confluentinc#4912 and may other bugs around use of NULL. fixes a few issues with NULLs in ksqlDB. You can now: - insert NULL values using `INSERT INTO`, for example `INSERT INTO foo VALUES (NULL, NULL);`, including use of `ARRAY`, `MAP` & `STRUCT` constructors with `NULL`s. - create MAPs with null keys and values, for example `MAP('k0' := NULL, CAST(NULL AS STRING) := 10)`. (At least one key needs to be non-null or CAST so that ksqlDB can determine the schema of the map). - CAST NULL to any type, including the complex types `ARRAY`, `MAP` and `STRUCT`. Also, better error messages, on: - Pull query on NULL key. Previously, blew up for non-string keys. - Pull query with non-literal expression for the key. Previously blew up.
* fix: improve handling of NULLs fixes: #4912 and may other bugs around use of NULL. fixes a few issues with NULLs in ksqlDB. You can now: - insert NULL values using `INSERT INTO`, for example `INSERT INTO foo VALUES (NULL, NULL);`, including use of `ARRAY`, `MAP` & `STRUCT` constructors with `NULL`s. - create MAPs with null keys and values, for example `MAP('k0' := NULL, CAST(NULL AS STRING) := 10)`. (At least one key needs to be non-null or CAST so that ksqlDB can determine the schema of the map). - CAST NULL to any type, including the complex types `ARRAY`, `MAP` and `STRUCT`. Also, better error messages, on: - Pull query on NULL key. Previously, blew up for non-string keys. - Pull query with non-literal expression for the key. Previously blew up. Co-authored-by: Andy Coates <[email protected]>
I was able to INSERT INTO SELECT and set null values for STRUCTS and other non-primitive types with CAST() as of at least v0.27.2 |
Running:
Should work, but fails with NPE.
The text was updated successfully, but these errors were encountered: