Skip to content

TextIO.withoutSharding sets shard template name to empty string instead of null #18573

@kennknowles

Description

@kennknowles

If TextIO.Write.withoutSharding() is called, it sets shard template name to empty string by calling withShardTemplateName(""). This causes an issue if custom filename policy is also set, since checks in expand() require that shardTemplateName is null if filenamePolicy is set.

Only workaround is currently to explicitly call withShardNAmeTemplate(null) after calling withoutSharding() resulting in an ugly code.

Imported from Jira BEAM-3082. Original Jira may contain additional context.
Reported by: sivu.

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