Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST_BUFFER No matching method for class com.esri.hadoop.hive.ST_Buffer and Unable to execute method public org.apache.hadoop.io.BytesWritable com.esri.hadoop.hive.ST_Buffer.evaluate #161

Open
kullaibigdata opened this issue Mar 14, 2019 · 4 comments
Labels

Comments

@kullaibigdata
Copy link

kullaibigdata commented Mar 14, 2019

Hi,

For the spatial hive quiries I am using below jars.

add jar /home/hdfs/esri-geometry-api.jar;
add jar /home/hdfs/spatial-sdk-hive-1.1.1-SNAPSHOT.jar;
add jar /home/hdfs/spatial-sdk-json-1.1.1-SNAPSHOT.jar;

When I execute the below query getting getting below error.

  1. hive> select fclass, interpolated_line_geom, ST_Buffer(interpolated_line_geom, 0.00001) from demo.spatial_interpolated_line;
    FAILED: SemanticException [Error 10014]: Line 1:43 Wrong arguments '0.00001': No matching method for class com.esri.hadoop.hive.ST_Buffer with (string, decimal(5,5)). Possible choices: FUNC(binary, double)

Now I am changing data type as per showing first result but still issue is occurring.

  1. hive> select fclass, interpolated_line_geom, ST_Buffer(interpolated_line_geom, 0.00001) from demo.spatial_interpolated_line;
    OK
    Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.io.BytesWritable com.esri.hadoop.hive.ST_Buffer.evaluate(org.apache.hadoop.io.BytesWritable,org.apache.hadoop.hive.serde2.io.DoubleWritable) with arguments {22 30 31 30 35 30 30 30 30 32 30 45 36 31 30 30 30 30 30 30 31 30 30 30 30 30 30 30 31 30 32 30 30 30 30 30 30 30 34 30 30 30 30 30 30 31 32 39 36 43 32 43 44 46 33 39 38 35 33 34 30 33 30 38 34 39 43 46 37 46 46 37 42 33 31 34 30 33 45 38 36 44 38 41 41 45 45 39 38 35 33 34 30 41 35 35 35 45 33 35 42 30 45 37 43 33 31 34 30 36 34 39 43 37 35 37 43 45 41 39 38 35 33 34 30 31 30 33 44 32 39 39 33 31 41 37 43 33 31 34 30 37 32 37 32 45 32 30 36 45 36 39 38 35 33 34 30 45 43 30 32 31 39 30 38 32 33 37 43 33 31 34 30 22,1.0E-5}:invalid shape type
    Time taken: 0.183 seconds

Could you please advise anyone to solve this problem.

Thanks & Regards,
Kullaireddy N.

@randallwhitman
Copy link
Contributor

@randallwhitman
Copy link
Contributor

Also how is spatial-interpolated-line generated? Maybe it is a shape buffer without the prefix. In which case try ST_GeomFromShape.

@randallwhitman
Copy link
Contributor

Ah - decimal type - may be the same issue as with #171.

@randallwhitman
Copy link
Contributor

Did not repro with SparkSQL-3.0; probably original issue was passing an argument of type string rather than binary.

spark-sql> select ST_AsText(ST_Buffer(ST_Point(1,1), 0.00001));
POLYGON ((1.00001 1, 1.0000099785892325 1.0000006540312922, ... 1.0000099785892325 0.9999993459687077, 1.00001 1))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants