recursive_rowfunc used rather than rowfunc
spark: use recursive rowfunc