Hi,

The pig codes are as below:

raw_data = load ... as (id:chararray, weight:float);
group_id = group raw_data by id;

filter_spec_id = filter group_id by group == '1';
count_spec_id = foreach filter_spec_id generate COUNT(raw_data) as tot;

sample_id = foreach filter_spec_id {
  order_weight = order raw_data by weight desc;
  limit_id = limit order_weight (int)count_spec_id.tot/2; -- *It's the
problem*
  generate limit_id;
}

The compiler complain limit should be followed by <INTEGER>.
So, how can I limit the relation with a variable?

Reply via email to