Fixed erroneous test cases in spark local operations.

Fixed some local test cases.