Skip to content

ST_CoordDim failing with wrong return type #26344

@jkhaliqi

Description

@jkhaliqi

getting error message:
[resultType-›equivalent(*simpleFunction Entry->type() •get()) Found incompatible return types for 'presto.default.st_numi nteriorring' (INTEGER vs. BIGINT) for input types (GEOMETRY)](failed: type->kind() == value.kind() (TINYINT vs. INTEGER) Top-level Expression: presto.default.st_coorddim(presto.default.st_geometryfromtext(road)) Operator: FilterProject[1]) 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

Error message should not display and query should run just fine

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

Screenshots (if appropriate)

Context

Spotted when running above query testing out ST_CoordDim function.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions