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

[Julia] Improves Julia support for scalar UDFs #15430

Merged
merged 9 commits into from
Jan 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update tests
  • Loading branch information
tqml committed Dec 20, 2024
commit d606b5db5b0c7ba0c411e413f01fd2159a4adab0
2 changes: 2 additions & 0 deletions tools/juliapkg/test/test_scalar_udf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,14 @@ my_reverse(s) = string(reverse(s))
#DuckDB.duckdb_scalar_function_set_function(mysum_udf.handle, ptr)
DuckDB.register_scalar_function(con, fun) # Register UDF

@test_throws ArgumentError DuckDB.register_scalar_function(con, fun) # Register UDF twice


DuckDB.execute(con, "CREATE TABLE test1 (a INT, b INT);")
DuckDB.execute(con, "INSERT INTO test1 VALUES ('1', '2'), ('3','4'), ('5', '6')")
result = DuckDB.execute(con, "SELECT mysum(a, b) as result FROM test1") |> DataFrame
@test result.result == [3, 7, 11]

end

@testset "UDF Macro Various Types" begin
Expand Down
Loading