Skip to content

fix: return flat namespace properties from BigQueryMetastoreCatalog.load_namespace_properties - #3650

Open
anxkhn wants to merge 1 commit into
apache:mainfrom
anxkhn:fix/bigquery-load-namespace-properties-shape
Open

anxkhn wants to merge 1 commit into
apache:mainfrom
anxkhn:fix/bigquery-load-namespace-properties-shape

Conversation

@anxkhn

@anxkhn anxkhn commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Rationale for this change

BigQueryMetastoreCatalog.load_namespace_properties returns BigQuery's nested
API representation instead of the flat namespace-properties map expected by
the catalog interface.

Return a copy of the stored parameters and expose the dataset's default storage
URI under the standard location key. As in Java's
BigQueryMetastoreCatalog.toMetadata, the dataset URI takes precedence over a
stale location parameter. Missing parameters and dataset options are handled
without returning a nested map or None.

Are these changes tested?

  • make lint passes, including mypy, Ruff, codespell, and lockfile validation.
  • make test passes the full unit suite.
  • Catalog tests cover the create/load round trip, flat properties, authoritative
    location precedence, missing parameters, empty locations, and missing options.
  • The tests use real BigQuery SDK dataset objects with the existing mocked
    client pattern. No BigQuery service calls were made.
  • The returned metadata shape was checked against the Java reference.

Are there any user-facing changes?

Yes. Namespace properties are returned directly, with the storage URI under
location, rather than inside parameters or defaultStorageLocationUri.

This update was prepared with AI assistance through OpenCode and independently
source-reviewed by Opus 5.5 and Gemini 4 Neon. Those reviews are not maintainer
approvals.

@anxkhn

anxkhn commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@kevinjqliu when you have a chance, could you please take a look at this pr and let me know if any update is needed?

@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Sep 12, 2026
Copilot AI lite review requested due to automatic review settings September 17, 2026 04:13
@anxkhn
anxkhn force-pushed the fix/bigquery-load-namespace-properties-shape branch from c334954 to cbb1a9f Compare September 17, 2026 04:13

Copilot AI left a comment

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.

🟢 Approval recommended

The change is covered by regression tests and has no blocking issues.

Pull request overview

Updates BigQuery namespace property loading to return flat properties consistent with the catalog contract.

Changes:

  • Returns namespace parameters as a flat map.
  • Adds tests for populated and unset parameters.
File summaries
File Description
tests/catalog/test_bigquery_metastore.py Adds regression coverage for namespace properties.
pyiceberg/catalog/bigquery_metastore.py Returns flat namespace properties.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot removed the stale label Sep 18, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Nov 25, 2026
Return the stored parameters rather than the nested BigQuery API object.
Expose the dataset's default storage URI as the standard location property,
matching Java BigQueryMetastoreCatalog, and retain empty-option handling.

Cover the create/load round trip, authoritative location precedence, and
missing parameters or dataset options without making BigQuery requests.

Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
@anxkhn
anxkhn force-pushed the fix/bigquery-load-namespace-properties-shape branch from cbb1a9f to 62dd90a Compare November 26, 2026 19:07

This branch has not been deployed

No deployments
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.

3 participants