Python's union is implemented by union()ing the underlying `JavaRDD[Any]`s, so it doesn't add additional scheduler stages or pipes.

It would be possible to track the `jrdd_deserializer` (the function used to deserialize a Python stage's input from Java) on a per-partition basis, but it would add a lot of complicated bookeeping.

At the moment, I think that union() will only force re-serialization when unioning an untransformed RDD created with sc.textFile() with a transformed RDD, cartesian() product, or RDD created with parallelize().  Unions of nearly all other pairs of RDDs should be fine (so unioning a transformed textFile with an RDD created with parallelize() incurs no additional cost).  Do you think that the cases where re-serialization is needed are common enough that we need this per-partition tracking before we can merge this?  We could always add that later, since I don't think the change would break any user-facing APIs.