{"record":{"id":"b5d060125bf3ee2c","repo":"prestodb/presto","slug":"decoder-conversion-not-supported-b5d060","errorCode":"DECODER_CONVERSION_NOT_SUPPORTED","errorMessage":"could not parse non-value node as '%s' for column '%s'","messagePattern":"could not parse non-value node as '(.+?)' for column '(.+?)'","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/SecondsSinceEpochJsonFieldDecoder.java","lineNumber":81,"sourceCode":"            extends AbstractDateTimeJsonValueProvider\n    {\n        public SecondsSinceEpochJsonValueProvider(JsonNode value, DecoderColumnHandle columnHandle)\n        {\n            super(value, columnHandle);\n        }\n\n        @Override\n        protected long getMillis()\n        {\n            try {\n                if (value.isIntegralNumber()\n                        && !value.isBigInteger()) {\n                    return multiplyExact(value.longValue(), 1000);\n                }\n                if (value.isValueNode()) {\n                    return multiplyExact(parseLong(value.asText()), 1000);\n                }\n                throw new PrestoException(\n                        DECODER_CONVERSION_NOT_SUPPORTED,\n                        format(\"could not parse non-value node as '%s' for column '%s'\", columnHandle.getType(), columnHandle.getName()));\n            }\n            catch (NumberFormatException | ArithmeticException e) {\n                throw new PrestoException(\n                        DECODER_CONVERSION_NOT_SUPPORTED,\n                        format(\"could not parse value '%s' as '%s' for column '%s'\", value.asText(), columnHandle.getType(), columnHandle.getName()));\n            }\n        }\n    }\n}\n","sourceCodeStart":63,"sourceCodeEnd":93,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/SecondsSinceEpochJsonFieldDecoder.java#L63-L93","documentation":"SecondsSinceEpochJsonFieldDecoder.getMillis multiplies the decoded second-precision value by 1000. If the mapped JsonNode is not a numeric node (int/long/biginteger) and is not even a value node (i.e. it is an object or array), the decoder cannot obtain a numeric value and throws PrestoException(DECODER_CONVERSION_NOT_SUPPORTED, \"could not parse non-value node ...\"). Numeric nodes that overflow or are non-numeric text instead surface via the companion catch-all error.","triggerScenarios":"Column with dataFormat 'seconds-since-epoch' whose mapping resolves to a JSON object or array, e.g. payload '{\"time\": {\"sec\": 1700000000}}' mapped as 'time'; the isValueNode() check fails and the exception is thrown before any arithmetic.","commonSituations":"Producer nested or restructured the timestamp field; mapping points to a wrapper object; arrays used for compound time values (sec/nanos).","solutions":["Update the column mapping to the scalar field, e.g. mapping = 'time.sec'.","Validate sample payloads against the table definition after any producer schema change.","If compound time (seconds+nanos) is emitted, precompute a single seconds value upstream.","Fall back to varchar decoding plus Presto JSON functions for irregular structures."],"exampleFix":"// before\n-- event_time ... data_format='seconds-since-epoch', mapping='time'\n// after\n-- event_time ... data_format='seconds-since-epoch', mapping='time.sec'","handlingStrategy":"validation","validationCode":"JsonNode n = mapper.readTree(sampleJson).at(\"time.sec\");\nif (!n.isValueNode() || !(n.isNumber() || n.isTextual())) throw new IllegalStateException(\"seconds-since-epoch mapping must target a scalar numeric node\");","typeGuard":null,"tryCatchPattern":"try { runQuery(sql); } catch (SQLException e) { if (e.getMessage().contains(\"non-value node\")) { log.error(\"Mapping points at container node; fix column mapping\"); } else throw e; }","preventionTips":["Map to the exact leaf path of the seconds value.","Confirm seconds-vs-millis semantics with the producer before choosing a decoder.","Validate with a sample message whenever the payload schema evolves."],"tags":["presto","kafka-decoder","json","mapping","timestamp"],"backgroundTag":"json-mapping-mismatch","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"}