Skip to content

Make RowCoder @Internal #19702

@damccorm

Description

@damccorm

RowCoder is currently public in sdk.coders, tempting people to use it directly. But the Schemas API is written such that everyone should be using SchemaCoder, and RowCoder should be an implementation detail.

Unfortunately this isn't a trivial change, I tried to do it and resolve the few dependencies that cropped up, but running RowCoderTest yielded the following error:


tried to access class org.apache.beam.sdk.schemas.RowCoderGenerator$EncodeInstruction from class org.apache.beam.sdk.coders.Coder$ByteBuddy$abBJo3R3
java.lang.IllegalAccessError:
tried to access class org.apache.beam.sdk.schemas.RowCoderGenerator$EncodeInstruction from class org.apache.beam.sdk.coders.Coder$ByteBuddy$abBJo3R3
	at
org.apache.beam.sdk.coders.Coder$ByteBuddy$abBJo3R3.encode(Unknown Source)
	at org.apache.beam.sdk.coders.Coder$ByteBuddy$abBJo3R3.encode(Unknown
Source)
	at org.apache.beam.sdk.schemas.RowCoder.encode(RowCoder.java:159)
	at org.apache.beam.sdk.schemas.RowCoder.encode(RowCoder.java:54)
	at
org.apache.beam.sdk.coders.Coder.encode(Coder.java:136)
	at org.apache.beam.sdk.testing.CoderProperties.encode(CoderProperties.java:334)
	at
org.apache.beam.sdk.testing.CoderProperties.decodeEncode(CoderProperties.java:362)
	at org.apache.beam.sdk.testing.CoderProperties.coderDecodeEncodeEqualInContext(CoderProperties.java:104)
	at
org.apache.beam.sdk.testing.CoderProperties.coderDecodeEncodeEqual(CoderProperties.java:94)

My attempt is available at TheNeuralBit@869b8c6

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions