I am facing issue in scala/java.
Budget: ₹1,500 – ₹12,500 INR
I am using spark with sedona api basically geospatial join
val final_data = spark.sql(" SELECT * FROM" +
" (SELECT *, ST_GeomFromWKT(polygons.geometry) as y FROM polygons) polygons" +
" inner JOIN" +
" (SELECT ST_GeomFromWKT (points.geometry) as x, * FROM points) points" +
" WHERE ST_Contains(polygons.y,points.x) ").show(10)
but i am facing error this if i am using number of polygons of 20 size.
The error is as below
Job aborted due to stage failure: Task 0 in stage 4.0 failed 1 times, most recent failure: Lost task 0.0 in stage 4.0 (TID 4, localhost, executor driver): java.lang.ClassCastException: org.apache.spark.sql.catalyst.util.GenericArrayData cannot be cast to org.apache.spark.unsafe.types.UTF8String at org.apache.spark.sql.geosparksql.expressions.ST_GeomFromWKT.eval
If you are java export you can resolve it please ping if you can solve i will give around 1.5k
val final_data = spark.sql(" SELECT * FROM" +
" (SELECT *, ST_GeomFromWKT(polygons.geometry) as y FROM polygons) polygons" +
" inner JOIN" +
" (SELECT ST_GeomFromWKT (points.geometry) as x, * FROM points) points" +
" WHERE ST_Contains(polygons.y,points.x) ").show(10)
but i am facing error this if i am using number of polygons of 20 size.
The error is as below
Job aborted due to stage failure: Task 0 in stage 4.0 failed 1 times, most recent failure: Lost task 0.0 in stage 4.0 (TID 4, localhost, executor driver): java.lang.ClassCastException: org.apache.spark.sql.catalyst.util.GenericArrayData cannot be cast to org.apache.spark.unsafe.types.UTF8String at org.apache.spark.sql.geosparksql.expressions.ST_GeomFromWKT.eval
If you are java export you can resolve it please ping if you can solve i will give around 1.5k