{"record":{"id":"733bc0a9389d8b7e","repo":"apache/beam","slug":"error-decoding-double-field","errorCode":null,"errorMessage":"error decoding double field","messagePattern":"error decoding double field","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/graph/coder/row_decoder.go","lineNumber":256,"sourceCode":"\t\treturn errors.Wrap(err, \"error decoding varint field\")\n\t}\n\trv.SetUint(v)\n\treturn nil\n}\n\nfunc reflectDecodeSinglePrecisionFloat(rv reflect.Value, r io.Reader) error {\n\tv, err := DecodeSinglePrecisionFloat(r)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"error decoding single-precision float field\")\n\t}\n\trv.SetFloat(float64(v))\n\treturn nil\n}\n\nfunc reflectDecodeFloat(rv reflect.Value, r io.Reader) error {\n\tv, err := DecodeDouble(r)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"error decoding double field\")\n\t}\n\trv.SetFloat(v)\n\treturn nil\n}\n\nfunc reflectDecodeByteSlice(rv reflect.Value, r io.Reader) error {\n\tb, err := DecodeBytes(r)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"error decoding []byte field\")\n\t}\n\trv.SetBytes(b)\n\treturn nil\n}\n\n// customFunc returns nil if no custom func exists for this type.\n// If an error is returned, coder construction should be aborted.\nfunc (b *RowDecoderBuilder) customFunc(t reflect.Type) (func(io.Reader) (any, error), bool, error) {\n\tif fact, ok := b.allFuncs[t]; ok {","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/graph/coder/row_decoder.go#L238-L274","documentation":"Wrap added by reflectDecodeFloat when DecodeDouble fails reading an 8-byte double from the element stream. The cause is EOF/truncated row bytes or corrupt data for a float64 field — typically a producer/consumer coder mismatch or damaged intermediate data.","triggerScenarios":"reflectDecodeFloat during row decoding when DecodeDouble cannot read 8 bytes — truncated stream or misaligned field decode of incompatible data.","commonSituations":"Reading partially-written outputs, mixing pipeline versions with different row schemas, decoding foreign byte blobs.","solutions":["Verify input completeness and encoder compatibility.","Re-encode the source data with the current coder.","Ensure schema evolution compatibility between writer and reader.","Inspect raw bytes at the failure point for corruption."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := decoderFn(rv, r); err != nil {\n    if strings.Contains(err.Error(), \"error decoding double field\") {\n        return fmt.Errorf(\"truncated float64 field in row: %w\", err)\n    }\n    return err\n}","preventionTips":["Verify each record has room for all 8-byte doubles before decoding.","Keep float field types consistent between schema versions.","Detect truncation (io.EOF) upstream and surface record offsets.","Test decoding of persisted fixtures after any struct change."],"tags":["decode-error","float64-field","row-decoding","io"],"backgroundTag":"file-read-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}