You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*[dependencies]chrono = "0.4"*/use arroyo_udf_plugin::udf;use chrono::{Utc,Duration};#[udf]fndate_id_with_delta(delta:i64) -> String{let now = Utc::now();let result_date = now + Duration::days(delta);
result_date.format("%Y%m%d").to_string()}
Query (table is a Kafka source)
SELECT a, b, date_id_with_delta(-1) AS date_str
FROM table
An error is thrown after the first row is processed:
ERROR arroyo_server_common: panicked at crates/arroyo-worker/src/arrow/mod.rs:67:31:
should be able to compute batch: ArrowError(InvalidArgumentError("all columns in a record batch must have the same length"), None) panic.file="crates/arroyo-worker/src/arrow/mod.rs" panic.line=67 panic.column=31
When changing the UDF to include an extra parameter that isn’t used:
/*[dependencies]chrono = "0.4"*/use arroyo_udf_plugin::udf;use chrono::{Utc,Duration};#[udf]fndate_id_with_delta(x:f64,delta:i64) -> String{let now = Utc::now();let result_date = now + Duration::days(delta);
result_date.format("%Y%m%d").to_string()}
And adjust the query to:
SELECT a, b, date_id_with_delta(x, -1) AS date_str
FROM table
The query runs without any issues.
The text was updated successfully, but these errors were encountered:
hazelnut-99
changed the title
Sync UDFs: Unexpected Requirement for Input Table Parameter
Sync UDFs: Unexpected Requirement for Parameter
Jul 31, 2024
UDF Definition
Query (table is a Kafka source)
An error is thrown after the first row is processed:
When changing the UDF to include an extra parameter that isn’t used:
And adjust the query to:
The query runs without any issues.
The text was updated successfully, but these errors were encountered: