spark sql is just different enough from the engines I use that it breaks all my code
this statement
case when sum(flag = 'Y') over (partition by id) > 0
then 'Y' else 'N' end as flag
is supposed to return Y if any flag field of a given id is Y and it doesn't work because sum function in spark can only take numeric types. is there a workaround?