{"record":{"id":"277c3da495bd5978","repo":"prestodb/presto","slug":"unhandled-type","errorCode":null,"errorMessage":"Unhandled type: ","messagePattern":"Unhandled type: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-elasticsearch/src/main/java/com/facebook/presto/elasticsearch/ElasticsearchQueryBuilder.java","lineNumber":176,"sourceCode":"            return FieldValue.of(realValue);\n        }\n\n        if (type.equals(VARCHAR)) {\n            String stringValue = ((Slice) value).toStringUtf8();\n            return FieldValue.of(stringValue);\n        }\n\n        if (type.equals(TIMESTAMP)) {\n            String dateValue = Instant.ofEpochMilli((Long) value)\n                    .atZone(session.getSqlFunctionProperties().isLegacyTimestamp() ?\n                            ZoneId.of(session.getSqlFunctionProperties().getTimeZoneKey().getId()) :\n                            ZoneOffset.UTC)\n                    .toLocalDateTime()\n                    .format(ISO_DATE_TIME);\n\n            return FieldValue.of(dateValue);\n        }\n        throw new IllegalArgumentException(\"Unhandled type: \" + type);\n    }\n}\n","sourceCodeStart":158,"sourceCodeEnd":179,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-elasticsearch/src/main/java/com/facebook/presto/elasticsearch/ElasticsearchQueryBuilder.java#L158-L179","documentation":"Value conversion default in the Elasticsearch query builder: the bound value's type matches none of the handled Presto types (numeric, varchar, timestamp...), so it cannot be turned into an Elasticsearch FieldValue for the term/range query.","triggerScenarios":"Thrown at presto-elasticsearch/src/main/java/com/facebook/presto/elasticsearch/ElasticsearchQueryBuilder.java:176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Cast the predicate column to a supported type in SQL","Add a conversion branch for the missing type in the builder"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}