-
-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
As explained on Discrod we are missing a function that could apply other function on each element of intput array.
Example:
Input List
[
["action_type" => "action_1", "value" => 12.123],
["action_type" => "action_2", "value" => 10]
]
Function:
ref('cost_per_action_type')->eachElement(ref("value")->cast(type_float())Inside eval method of OnEach function we would need to get value of provided ref (list/map/struct/array), then iterate through it and convert each element to row, then execute provided scalar function on it and then convert it back to with Row::toArray().
When provided ref does not points to array like structure, it should return null.
Apache spark also provides similar function, however they called it transform:
https://spark.apache.org/docs/latest/api/scala/org/apache/spark/sql/functions$.html
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done
