Open krlmlr opened 1 month ago
R paste0?
takes ...
that can be either vectors or constants, through the wonders of recycling.
What should be handle here ?
I can prepare a PR for a paste
that would handle two columns as a first stepping stone. Anything else would not bind and then go back to R.
I think constants are fine too.
concat()
in duckdb has variadic arguments, can we implement in a similar way?
How does paste()
convert non-string arguments internally? Can we issue a bind error with invalid types?
Looks like concat()
uses things like D_ASSERT(input.GetType().InternalType() == PhysicalType::VARCHAR);
to assert all its arguments are strings.
I suppose we could handle a variadic number of string vectors and constants and otherwise throw a bind error, and so let R handle it. I'm wondering though if this might be a feature of duckplyr
, that would just map paste
and poaste0
to concat
.
Does duckdb support variadic macros? We'd need that for this idea. Otherwise we can forward in the C++ code in this repo?
paste()
paste0()