Only difference between testFRJoinOut8 and testFRJoinOut9 was 'replicated' vs 'repl'. So repurposed testFRJoinOut9 for adding test.
The code in TezDAGBuilder put in for scalars was not needed any more. So totally removed it. TestScalarAlias, Scalar and CastScalar e2e tests are fine. Running the full e2e suite now.
Additionally optimized the Scalar more than one row checking by doing that while writing the output. MultiQueryOptimizer and UnionOptimizer still do not handle it. Created PIG-4692 for that. The check in ReadScalarsTez is still there and cannot be removed as it is required to handle cases where multiple source tasks write 0 or 1 record each. In that case it will not fail while writing, but will fail when reading as there will be more than 1 record.