You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by 笨猫 <wy...@qq.com> on 2013/06/25 14:05:14 UTC
how can i filter tuple that have same value in two field
how can i filter tuple that have same value in two field?
my data is :
(000000000000000000,13803493583,0.4,000000000000000000,66504185,0.10869565217391304)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,66504185,0.10869565217391304)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,03518596699,0.043478260869565216)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,13081078887,0.34782608695652173)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,13466848621,0.08695652173913043)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,13803493583,0.043478260869565216)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,15235128664,0.21739130434782608)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,15601767940,0.08695652173913043)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,18978074197,0.043478260869565216)
(000000000000000000,0351-8596699,0.001949317738791423,000000000000000000,0351-8596699,0.021739130434782608)
i want to get the last tuple because $1==$4
but when i run the code:tmp14 = filter tmp13 by $1!=$4; not have right result。
anyone help me?