I tried to put a break point and do the following in the watch window: check .getSize() which is supposed to return size in bytes. And .materialize() to see if I can look at the java objects.
The .getSize() does show a number >0 but I doubt if that should be an indicator of the PTable having elements. The .materialize() did not show anything to indicate the presence of elements.
Thanks in advance.
Instead of relying on
PCollection.size()
method to check whether your collection is empty or not, you should usePCollection.length()
, which does exactly what you need.