I was getting a similar error, after inspecting my data I found out the culprit. Here is my data row separated by '\t', look at the 8th field '1' which is causing the error in my case. 24233 3568926 13659 346207 60859 1 136084 '1' 2 ' 0.0
To fix this you can write a simple UDF to return value without single quotes. -- Richipal Singh