Skip to content

fix: correct spanner column schema type parser#34867

Merged
Abacn merged 1 commit intoapache:masterfrom
nielm:schemaparse
May 6, 2025
Merged

fix: correct spanner column schema type parser#34867
Abacn merged 1 commit intoapache:masterfrom
nielm:schemaparse

Conversation

@nielm
Copy link
Contributor

@nielm nielm commented May 6, 2025

Regex for parsing array types did not take into account sized primitive types, eg ARRAY<STRING(MAX)>

Fixes #34863

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

Regex for parsing array types did not take into account
sized primitive types, eg ARRAY<STRING(MAX)>

Fixes apache#34863
Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that the added test failed on current HEAD with

java.lang.IllegalArgumentException: Invalid ARRAY type: ARRAY<STRING(MAX)>
	at org.apache.beam.sdk.io.gcp.spanner.SpannerSchema$Column.parseSpannerType(SpannerSchema.java:223)

and succeeded on this PR. Thanks for the quick fix!

@nielm nielm changed the title fix: correct spanner column schema type parser [release-2.65] Cherrypick PR #34867 to the release branch May 6, 2025
@nielm nielm changed the title [release-2.65] Cherrypick PR #34867 to the release branch fix: correct spanner column schema type parser May 6, 2025
@Abacn
Copy link
Contributor

Abacn commented May 6, 2025

testAtLeastOnceDynamicDestinationsWithAutoSchemaUpdate[1] (org.apache.beam.sdk.io.gcp.bigquery.StorageApiSinkSchemaUpdateIT) failed not related to this change

@Abacn Abacn merged commit b3636fa into apache:master May 6, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Spanner schemas with ARRAY<STRING(xxx)> fail to parse

3 participants