Skip to content

Physical-plan serialization drops ProjectionExec metadata #24695

Closed

Description

@gene-bordegaray

Physical-plan serialization

Before ProjectionExecNode serialized:

PhysicalPlanNode input = 1;
repeated PhysicalExprNode expr = 2;
repeated string expr_name = 3;

On decode, DataFusion reconstructed the projection which is fine when the complete output schema can be derived from the expression and input but metadata cannot be.

Given:

Before serialization:

Input field:
  value: Int32
  metadata: {}

Projection expression:
  value@0 AS value

ProjectionExec output schema:
  value: Int32
  field metadata: {"field-key": "field-value"}
  schema metadata: {"schema-key": "schema-value"}

---

After serialization and decoding:

ProjectionExec output schema:
  value: Int32
  field metadata: {}
  schema metadata: {}

this was roginally found in #24670 but not fixed there since it was out of optimizer scope / unrelated bug

Activity

  1. timsaucer commented on Sep 2, 2026

    @timsaucer
    Member

    I have verified this is not a regression from 54.1.0 -> 55.0.0 since serialization in 54 did not support metadata. This issue was exposed by the release of 55.0.0 during testing of the related issue but it is not a regression. I think resolving this will require a change at the protobuf definition which will be outside of the patch release. I do think this should be fixed, but not back ported to 55.1.0.

  2. goutamadwant commented on Sep 7, 2026

    @goutamadwant
    Contributor

    @timsaucer I implemented the metadata-preserving serialization change in #25009 . It adds an optional schema only for metadata overrides and restores it through the existing metadata-only constructor. Let me know if this looks good! thanks.

  3. gene-bordegaray commented on Sep 10, 2026

    @gene-bordegaray
    ContributorAuthor

    hey @goutamadwant I took a look at the PR and left some comments. Just checking in on progress on this guy 👍

  4. added a commit that references this issue on Oct 8, 2026
    5c0e73f
  5. added a commit that references this issue on Oct 11, 2026
    a6b29c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions