This is a translation of Cassandra's CQL unit test source file validation/entities/UFTypesTest.java into our cql-pytest framework. There are 7 tests, which reproduce one known bug: Refs #13746: UDF can only be used in SELECT, and abort when used in WHERE, or in INSERT/UPDATE/DELETE commands And uncovered two previously unknown bugs: Refs #13855: UDF with a non-frozen collection parameter cannot be called on a frozen value Refs #13860: A non-frozen collection returned by a UDF cannot be used as a frozen one Additionally, we encountered an issue that can be treated as either a bug or a hole in documentation: Refs #13866: Argument and return types in UDFs can be frozen Closes #13867
36 lines
681 B
TOML
36 lines
681 B
TOML
[package]
|
|
name = "examples"
|
|
version = "0.0.0"
|
|
edition = "2021"
|
|
publish = false
|
|
|
|
[dependencies]
|
|
chrono = "0.4.24"
|
|
scylla-udf = "0.1.0"
|
|
uuid = "1.3.0"
|
|
|
|
[[example]]
|
|
name = "return_input"
|
|
path = "return_input.rs"
|
|
crate-type = ["cdylib"]
|
|
|
|
[[example]]
|
|
name = "test_short_ints"
|
|
path = "test_short_ints.rs"
|
|
crate-type = ["cdylib"]
|
|
|
|
[[example]]
|
|
name = "test_complex_null_values"
|
|
path = "test_complex_null_values.rs"
|
|
crate-type = ["cdylib"]
|
|
|
|
[[example]]
|
|
name = "test_functions_with_frozen_types"
|
|
path = "test_functions_with_frozen_types.rs"
|
|
crate-type = ["cdylib"]
|
|
|
|
[[example]]
|
|
name = "test_types_with_and_without_nulls"
|
|
path = "test_types_with_and_without_nulls.rs"
|
|
crate-type = ["cdylib"]
|