Skip to content

Field Metadata Lost on CROSS JOIN #12734

@alamb

Description

@alamb

Describe the bug

During upgrade of DataFusion in InfluxDB @itsjunetime found that somewhere Field level metadata (aka Field::with_metadata is being lost during DataFusion logical planning

This manifests itself as an error during the physical planning

Internal Error: Physical input schema should be the same as the one converted from logical input schema

To Reproduce

Run this query in metadata.slt

# Regression test: missing schema metadata, when aggregate on cross join
query I
SELECT count("data"."id")
FROM
  (
   SELECT "id" FROM "table_with_metadata"
  ) as "data",
  (
    SELECT "id" FROM "table_with_metadata"
  ) as "samples";

Expected behavior

No error during physical planning

Additional context

Metadata

Metadata

Assignees

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