Skip to content

[PLUGIN-1948] Fix ClassCastException in BigQuery source plugin for table definition#1607

Merged
adrikagupta merged 1 commit intodevelopfrom
fix-plugin-1948
Apr 13, 2026
Merged

[PLUGIN-1948] Fix ClassCastException in BigQuery source plugin for table definition#1607
adrikagupta merged 1 commit intodevelopfrom
fix-plugin-1948

Conversation

@adrikagupta
Copy link
Copy Markdown
Contributor

@adrikagupta adrikagupta commented Apr 13, 2026

When fetching table metadata, the plugin incorrectly assumes all BigQuery tables are standard tables and attempts to cast the TableDefinition directly to a StandardTableDefinition - link.

The pipeline crashes with the following error:

java.lang.ClassCastException: class com.google.cloud.bigquery.AutoValue_MaterializedViewDefinition cannot be cast to class com.google.cloud.bigquery.StandardTableDefinition

This PR fixes this issue.

Testing

  • Created a pipeline with BQ source and added materializing view as the table. Successfully ran the preview and pipeline deployment.

Also tested the below to verify non materializing view (standard table) scenarios:

  • Created a pipeline with BQ source and added range-partitioning table with & without required paritioning filter as true. Successfully ran the preview and pipeline deployment.
  • Created a pipeline with BQ source and added ingestion partitioning table with required paritioning filter as true. Successfully ran the preview and pipeline deployment.

@adrikagupta adrikagupta added the build Trigger unit test build label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@vikasrathee-cs vikasrathee-cs left a comment

Choose a reason for hiding this comment

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

LGTM

@adrikagupta adrikagupta merged commit 8d18d63 into develop Apr 13, 2026
19 checks passed
@adrikagupta adrikagupta deleted the fix-plugin-1948 branch April 13, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Trigger unit test build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants