apache / apache/beam

PubSubIO.readAvros should produce a schema'd PCollection if clazz has a schema

Open
#19,829 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

gcp improvement io java P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
2d 10h
Merged PRs (30d)
197

Description

Currently PubsubIO.readAvros(clazz) always yields a PCollection with an AvroCoder. This should only be a fallback in the event that no coder can be inferred. That way if we can infer a schema for clazz we will produce a PCollection with a schema.

Imported from Jira BEAM-8330. Original Jira may contain additional context.
Reported by: bhulette.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Java PubsubIO.readAvros(clazz) entry point and inspect how its coder is selected. Check existing PubSubIO tests for coder or schema assertions. Done means a class with an inferable schema produces a schema-backed PCollection, while AvroCoder remains the fallback when no coder can be inferred.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.