Skip to content
Advertisement

How convert JavaRDD to JavaRDD<List>?

JavaScript

I try make it with use this code, but I get WrappedArray

JavaScript

How make it correctly?

Advertisement

Answer

You can use getList method:

JavaScript

where lemmas is the name of the column with lemmatized text. If there is only one column (it looks like this is the case) you can skip select. If you know the index of the column you can skip select as well and pass index to getList but it is error prone.

Your current code iterates over the Row not the field you’re trying to extract.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement