Skip to content

Support lakehouse PCNT format in BigQueryIO storage read. - #39597

Merged
claudevdm merged 6 commits into
apache:masterfrom
claudevdm:pcnt-reads
Aug 21, 2026
Merged

claudevdm merged 6 commits into
apache:masterfrom
claudevdm:pcnt-reads

Conversation

@claudevdm

Copy link
Copy Markdown
Collaborator

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

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.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@claudevdm claudevdm changed the title initial Support lakehouse PCNT format in BigQueryIO storage read. Aug 3, 2026
@claudevdm
claudevdm force-pushed the pcnt-reads branch 3 times, most recently from 4810420 to f6956de Compare August 3, 2026 19:09
@claudevdm
claudevdm marked this pull request as ready for review August 3, 2026 19:17
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions

Copy link
Copy Markdown
Contributor

Reminder, please take a look at this pr: @ahmedabu98

@github-actions

Copy link
Copy Markdown
Contributor

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @chamikaramj for label java.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

Comment on lines +536 to +549
} else {
// Two colons - the last colon is an explicit project terminator. This is
// the canonical spelling for a domain-scoped project, whose id itself
// contains a colon ("example.com:proj:ds.t"), including with a composite
// Lakehouse catalog dataset ("example.com:proj:catalog.ns.t"). Both
// domain-scoped spellings keep toTableSpec/parseTableSpec a round trip
// for composite dataset ids. (More than two colons cannot form a valid
// reference - project ids contain at most one colon, but such specs pass
// the character-set gate, so they bind here too and the impossible
// project id is rejected by the service.)
int lastColon = prefix.lastIndexOf(':');
project = prefix.substring(0, lastColon);
dataset = prefix.substring(lastColon + 1);
}

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.

Should we make this else if (colonCount == 2) and throw an error on else? 3+ colons are not expected and should throw

@ahmedabu98 ahmedabu98 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.

Looks great. I reached out to some folks and will get back on the questions below

Comment thread sdks/java/io/google-cloud-platform/build.gradle

@ahmedabu98 ahmedabu98 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.

LGTM

@claudevdm
claudevdm merged commit 4e5ae91 into apache:master Aug 21, 2026
26 checks passed
claudevdm added a commit to claudevdm/beam that referenced this pull request Oct 2, 2026
… DIRECT_READ

Port of the Java change in apache#39597 to the Python SDK.

- parse_table_reference now assigns segments by explicit splitting (mirroring
  BigQueryHelpers.parseTableSpec) so 4-part `project.catalog.namespace.table`
  and `project:catalog.namespace.table` specs map to a composite
  `catalog.namespace` dataset id. Previously the dotted form raised and the
  colon form silently bound the project to `project:catalog`.
- Storage Read split tolerates tables that report no numBytes by requesting
  zero streams so the Read API picks the stream count; the export source's
  size estimate returns 0 instead of raising.
- Unit tests for the new spec forms, domain-scoped projects, invalid specs,
  and the numBytes-missing paths.
tvalentyn pushed a commit that referenced this pull request Oct 5, 2026
#40225)

* [Python] Support Lakehouse runtime catalog tables in ReadFromBigQuery DIRECT_READ

Port of the Java change in #39597 to the Python SDK.

- parse_table_reference now assigns segments by explicit splitting (mirroring
  BigQueryHelpers.parseTableSpec) so 4-part `project.catalog.namespace.table`
  and `project:catalog.namespace.table` specs map to a composite
  `catalog.namespace` dataset id. Previously the dotted form raised and the
  colon form silently bound the project to `project:catalog`.
- Storage Read split tolerates tables that report no numBytes by requesting
  zero streams so the Read API picks the stream count; the export source's
  size estimate returns 0 instead of raising.
- Unit tests for the new spec forms, domain-scoped projects, invalid specs,
  and the numBytes-missing paths.

* comments

* comments
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.

2 participants