Skip to content

BigQuery: Add support for historical property names for backward compatibility#15991

Open
dbjnbnrj wants to merge 1 commit intoapache:mainfrom
dbjnbnrj:historical-properties
Open

BigQuery: Add support for historical property names for backward compatibility#15991
dbjnbnrj wants to merge 1 commit intoapache:mainfrom
dbjnbnrj:historical-properties

Conversation

@dbjnbnrj
Copy link
Copy Markdown
Contributor

@dbjnbnrj dbjnbnrj commented Apr 15, 2026

Add support for historical property names (gcp_project and gcp_location) in BigQueryProperties to maintain backward compatibility with internal configurations.

Fixes #14422

@github-actions github-actions bot added the GCP label Apr 15, 2026
@dbjnbnrj
Copy link
Copy Markdown
Contributor Author

cc: @vladislav-sidorovich

@dbjnbnrj dbjnbnrj force-pushed the historical-properties branch from 6533889 to 00c9baa Compare April 15, 2026 21:43
@dbjnbnrj dbjnbnrj changed the title Adding support for historical property names in BigQuery BigQuery: Add support for historical property names for backward compatibility Apr 15, 2026
Copy link
Copy Markdown
Contributor

@gaborkaszab gaborkaszab left a comment

Choose a reason for hiding this comment

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

Hi @dbjnbnrj , Thank you for submitting the PR!

I'm pretty hesitant to add something to OSS Iceberg that is to cover some proprietary internal mechanism TBH. As you write in HistoricalPropertyNames these params are to fallback to some Google internal stuff, I don't see much benefit of adding these to open source.
Let's see what others think.

+ "Found both properties '%s' and '%s', only one must be used.",
PROJECT_ID,
HistoricalPropertyNames.PROJECT_ID);
Preconditions.checkArgument(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably no need for this check because seem to overlap with the one at L129

projectId != null, "Invalid GCP project: %s must be specified", PROJECT_ID);

this.location = properties.getOrDefault(GCP_LOCATION, DEFAULT_GCP_LOCATION);
String fallbackLocation =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this.location could be populated the same way as this.projectId by using a ternary operator to handle the fallback.
You might want to consider using PropertyUtil too:

PropertyUtil.propertyAsString(
            mergedProps,
            RESTCatalogProperties.NAMESPACE_SEPARATOR,
            RESTUtil.NAMESPACE_SEPARATOR_URLENCODED_UTF_8);

@dbjnbnrj
Copy link
Copy Markdown
Contributor Author

Hi @dbjnbnrj , Thank you for submitting the PR!

I'm pretty hesitant to add something to OSS Iceberg that is to cover some proprietary internal mechanism TBH. As you write in HistoricalPropertyNames these params are to fallback to some Google internal stuff, I don't see much benefit of adding these to open source. Let's see what others think.

Thanks for the review @gaborkaszab . Wanted to confirm with @vladislav-sidorovich and @talatuyarer if this change is needed. Its a fix for #14422.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQueryMetastoreCatalog configuration properties: gcp_project vs gcp.bigquery.project-id, which is correct?

2 participants