He took his complaint to the Employment Relations Authority (ERA).
However, the authority sided with his former employer, and praised the supermarket for its efforts to resolve the dispute between the two men and to keep them both employed.
It said accusations of racism and harassment "were not substantiated" during its investigation.
"Pak'n Save is a multicultural workplace employing some 34 different nationalities. It is sensitive to cultural and language issues and proactively takes steps to ensure that all employees feel comfortable, welcome and supported in the workplace," the ERA said in its determination.
It noted that both Mr Abiar and Mr Ansorali "come from troubled backgrounds", and said it was "satisfied that Pak'n Save was sensitive to that, so wished to support both of them to integrate into their new life in New Zealand".
The two men appeared to have a poor relationship from the start, resulting from Mr Ansorali's "teasing" of Mr Abiar. It came to a head in January 2012 when Mr Ansorali wrote, 'I am gay', on Mr Abiar's name badge.
Mr Abiar, who is not gay, was "very upset about this", the authority said. He complained to management, who issued Mr Ansorali with a final written warning and ordered him to apologise to Mr Abiar.
The pair were then separated at Mr Abiar's request, with Mr Abiar relocated to the grocery department, and Mr Ansorali remaining in the produce department. An agreement was also reached that they would not speak to each other to avoid further issues.
The ERA noted that Pak'n Save "found that undesirable in terms of collegial workplace relations", but nevertheless agreed to it in order to "ensure workplace harmony".
No further issues arose until the September 2013 incident, when Mr Ansorali greeted Mr Abiar as he arrived for work. Mr Abiar then left work without telling anyone, and when he was contacted by his manager he was described as "highly agitated and clearly very upset".
He refused to return to work, and said he was "so angry that if he came back into work he would get a knife and 'kill' Mr Ansorali, so it was better for him to stay away", the ERA recorded.
His managers tried to persuade him to return, saying he was considered a good worker and the supermarket "did not want to lose him". A formal investigation also took place into all the allegations Mr Abiar set out in a subsequent letter. But, he did not return to work.
Authority member Rachel Larmer said she was satisfied that he resigned voluntarily, and that "Pak'n Save did not fundamentally breach a duty to Mr Abiar".
"Nor did it engage in a concerted course of conduct designed to induce Mr Abiar's resignation. Quite the contrary," Ms Larmer said.
"Pak n Save made it very clear to Mr Abiar that it considered that he was a valued employee ... and it is clear from the evidence that Pak'n Save took steps to address Mr Abiar's concerns and to encourage him to return to work."
Ms Larmer added: "Although I realise Mr Abiar does not agree with me, my objective view based on the evidence I heard is that Pak'n Save did support Mr Abiar in the workplace and it did take concerns he raised seriously.
"I consider that Mr Abiar was ill-disposed to Mr Ansorali because of what had occurred in January 2012. Mr Abiar therefore took umbrage when he was greeted by Mr Ansorali in September 2013, so decided he wanted to resign."
His claim of unjustified dismissal was rejected.