The reason that this worked for textFile() and not parallelize() is due to how PySpark represents its objects in Java: multiple Python objects may be serialized into a single Java byte array, so I think you'll have to re-implement part of this method in Python rather than just calling the underlying Java method.

You'll notice similar problems if you call map() on the result of textFile(), too, as in textFile(..).map().countApprox().  The reason that textFile().countApprox() worked is that it's actually backed by a `JavaRDD<String>` rather than a `JavaRDD<byte[]>`.

If you look at similar methods, like `count()`, you'll notice that they're also not implemented directly in terms of their Java equivalents.

One of the very first prototypes of Pyspark actually had a 1-to-1 mapping between Python and Java objects; it would have supported the Java versions of join(), distinct(), count(), etc, but the correctness relied on equal Python objects having equal serialized representations, which isn't always true with serializers like pickle.  There's a [discussion of this](https://cwiki.apache.org/confluence/display/SPARK/PySpark+Internals#PySparkInternals-WhynotperformmoreoftheprocessinginJava?) in the PySpark internals guide.