apache/flink · error · RuntimeException

Error creating field union of record data: %s

Error message

Error creating field union of record data: %s

What it means

Error "Error creating field union of record data: %s" thrown in apache/flink.

Source

Thrown at flink-core/src/main/java/org/apache/flink/types/Record.java:639

                    }

                    // copy the remaining fields directly as binary
                    if (begin != -1) {
                        this.serializer.write(sourceForRemainder.binaryData, begin, end - begin);
                    }

                    // the lengths can be copied directly
                    if (lengths != sourceForRemainder.lengths) {
                        System.arraycopy(
                                sourceForRemainder.lengths,
                                minFields,
                                lengths,
                                minFields,
                                maxFields - minFields);
                    }
                }
            } catch (Exception ioex) {
                throw new RuntimeException(
                        "Error creating field union of record data" + ioex.getMessage() == null
                                ? "."
                                : ": " + ioex.getMessage(),
                        ioex);
            }
        } else {
            // the general case, where at least one of the two records has a binary representation
            // that is not in sync.
            final int estimatedLength =
                    (this.binaryLen > 0
                                    ? this.binaryLen
                                    : this.numFields * DEFAULT_FIELD_LEN_ESTIMATE)
                            + (other.binaryLen > 0
                                    ? other.binaryLen
                                    : other.numFields * DEFAULT_FIELD_LEN_ESTIMATE);
            this.serializer.memory =
                    (this.switchBuffer != null && this.switchBuffer.length >= estimatedLength)
                            ? this.switchBuffer

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Address the cause reported by the error message: Error creating field union of record data: the reported value
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("Error creating field union of record data: the reported value") and rerun the job or command.

When it happens

Trigger: Triggered at runtime when the operation fails because: Error creating field union of record data: the reported value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Error creating field union of record data: the reported value.


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/efcb0d9a783787e8. Report an issue: GitHub.