Skip to content

[Bug]: Iceberg record conversion utils do not handle collections of structs correctly #34887

@ahmedabu98

Description

@ahmedabu98

What happened?

Our conversion logic needs to be more nuanced for collection types (i.e. Arrays, Iterables, Maps)

Beam to Iceberg:

case ARRAY:
case ITERABLE:
case MAP:
rowBuilder.addValue(icebergValue);
break;

Iceberg to Beam:

case LIST:
Optional.ofNullable(value.getArray(name)).ifPresent(list -> rec.setField(name, list));
break;
case MAP:
Optional.ofNullable(value.getMap(name)).ifPresent(v -> rec.setField(name, v));
break;

We need to inspect the collection type and recurse if it's a struct.

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions