S) Ball & run Scenario | Type 2

 

 

 Input data 

 

 

over run 

1 6 

2 5 

3 13 

 

 

 

 

Rollup 

 Use key change function 

type temporary_type= 

record 

decimal("\n")run_per_over; 

end; 

out::key_change(in1,in2)= 

begin 

out::if((decimal("|"))in2.ball%6==1)1 else 0; 

end; 

temp::initialize(in)= 

begin 

temp.run_per_over ::0; 

end; 

temp ::rollup (temp,in)= 

begin 

temp.run_per_over ::temp.run_per_over+(decimal("|"))in.run; 

end; 

out :: finalize(temp, in) = 

begin 

out.over ::(decimal("|"))next_in_sequence(); 

out.run ::temp.run_per_over; 

end; 

 

 

Comments

Popular posts from this blog

T) For data parallelism, we can use partition components. For component parallelism, we can use replicate component. Like this which component(s) can we use for pipeline parallelism?

T) When to use sort within groups ?

T) Explain about on .abi-unc files in abinitio ?