Joined, right, and left joined



Could you explain what does the _2._2 means in the following syntex:

ordersLeftOuter.filter(rec => rec._2._2 == None).take(10).foreach(println)

I'm joining the orders and orders_items from the retail_db



1 Answer(s)


While it would have been a lot better if you specified the full code definition for the variable rec, I would rightly guess that the type of the variable is such one of a nested tuple.

The first rec._2 returns another tuple that in turn has another ._2 item.

Is my explanation pretty clear?
You might want to post the full code that includes the definition of rec.