Skip to content

ST_NumPoints Failure on query in prestoC++ #26282

@jkhaliqi

Description

@jkhaliqi

getting error message:
resultType->equivalent(*simpleFunctionEntry->type().get()) Found incompatible return types for 'presto.default.st_numpoints' (INTEGER vs. BIGINT) for input types (GEOMETRY). in prestissimo

Your Environment

  • Presto version used:
  • Storage (HDFS/S3/GCS..):
  • Data source and connector used:
  • Deployment (Cloud or On-prem):
  • Pastebin link to the complete debug logs:

Expected Behavior

In presto java

Image

Current Behavior

In PrestoC++

Image

Possible Solution

change the return type from int32_t (integer) to int64_t(bigint) to match the presto return type of bigint as well.

Steps to Reproduce

  1. CREATE TABLE lines (id INTEGER, wkt VARCHAR);
    insert into lines (id, wkt) values " +
    "(0500, 'linestring empty')," +
    "(0501, 'linestring (10.01 20.03, 1 2)')," +
    "(0502, 'linestring (5 10, 13 23)')," +
    "(0503, 'linestring (12 15, 23 23)')," +
    "(0504, 'linestring (23 43, 43 63)')," +
    "(0505, 'linestring (29 59, 34 44)')," +
    "(0506, 'linestring (15 51, 18 61)')," +
    "(0507, 'linestring (24 18, 27 22)')," +
    "(0508, 'linestring (5 40, 5 50)')";
  2. run in prestoC++ and should get failure as above.

Screenshots (if appropriate)

Context

Spotted when running e2e tests with different queries

Metadata

Metadata

Labels

Type

No type

Projects

Status

🆕 Unprioritized

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions