Y = FILTER A BY f1 == '8';
You are using the '==' operator with a string '8'. Just try
Y = FILTER A BY f1==8;
This is related to the concerns I've been raising. In the above example
(with f1 == '8'), the result is an empty table. And we need to ensure that
both semantically and implementation wise, PIG handles empty tables/bags in
a manner consistent with non-empty tables.