How to show all available functions for an object?


#1

In Scala shell, I understand that, using RDD for example, I can show available functions by hit tab key after the period .

However it seems it doesn’t really show all the available functions.

e.g.
scala> b
res11: org.apache.spark.rdd.RDD[(Int, String)] = MapPartitionsRDD[9] at keyBy at :29
when I type tab below
scala>b.subtract

It will show:
def subtract(other: RDD[T]): RDD[T]
def subtract(other: RDD[T], numPartitions: Int): RDD[T]
def subtract(other: RDD[T], p: org.apache.spark.Partitioner)(implicit ord: scala.math.Ordering[T]): RDD[T]

But where is the subtractByKey?

When I typed tab afterb.subtractBy, it doesn’t show subtractByKey, but subtractByKey is an available function to RDD

Am I missing anything here?

Thank you.


#2

Yes, I also observed that issue. The only way is to go through the API documentation or remember it.


#3

That is really too bad, what about pyspark, it seems pyspark doesn’t come with this feature at all?


#4

Note sure about pyspark