Skip to content

[pull] master from apache:master - #656

Merged
pull[bot] merged 3 commits into
section9-lab:masterfrom
apache:master
Sep 4, 2026
Merged

[pull] master from apache:master#656
pull[bot] merged 3 commits into
section9-lab:masterfrom
apache:master

Conversation

@pull

@pull pull Bot commented Sep 4, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

kennknowles and others added 3 commits September 3, 2026 16:32
…nRunner

The registrar only registers PAR_DO and
SPLITTABLE_PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS, so the
SPLITTABLE_SPLIT_AND_SIZE_RESTRICTIONS cases are unreachable now that
that stage has its own runner. Also collapse the two branches of the
SDF-process consumer, which constructed identical objects regardless of
whether windows were observed; the TODO for a non-window-observing
variant is retained.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ingle-item matches (#39851)

* fix(dataframe): handle pandas dimensionality reduction in .xs() for single-item matches

Beam's .xs() implementation assumed static output shape (DataFrame/Series)
across partitions, but pandas reduces dimensionality (DataFrame->Series,
Series->scalar) when a key matches exactly one row and all index levels
are selected. This caused TypeError/shape-mismatch failures during
cross-partition concat.

Fixes the key_size >= nlevels path to route matching partitions through
a singleton unwrap stage that mirrors pandas' actual runtime behavior,
while documenting the inherent proxy-time ambiguity for duplicate-match
cases (proxy assumes single-match dimensionality; runtime produces
whichever type pandas actually returns).

Fixes #28559

Signed-off-by: ManvithPanyam <250704031+ManvithPanyam@users.noreply.github.com>

* fix(dataframe): use reindex() for xs() proxy construction to support extension dtypes

Addresses review feedback: dtype.type() crashes on Categorical and
timezone-aware datetime dtypes since they aren't callable as zero-arg
scalar constructors. Switched the DataFrame branch to build the dummy
proxy via reindex() + xs(), letting pandas handle type construction
internally. Kept dtype.type() as the primary path for the Series
(single-match scalar) branch since reindex().iloc[0] alone silently
upcasts plain numeric types (e.g. int64 -> float64) by introducing NaN;
falls back to reindex().iloc[0] only on TypeError for extension types.
Also handles proxy indexes with duplicate labels, which reindex()
otherwise rejects.

Added regression tests for Categorical, tz-aware datetime, and nullable
Int64 columns.

Signed-off-by: ManvithPanyam <250704031+ManvithPanyam@users.noreply.github.com>

* fix(dataframe): simplify xs() proxy construction and fix non-empty duplicate-proxy crash

Further simplifies the reindex()-based proxy generation from the
previous commit: unifies dummy_index construction (was duplicated
per-branch), and hoists the is_unique/drop_duplicates() dedup check to
run once instead of twice.

The dedup check is retained, not removed — traced that pandas can cache
an IndexEngine on an index once inspected (e.g. via .is_unique, .loc,
.get_loc), and that cache can survive slicing to iloc[:0], leaving
is_unique stale as False on an otherwise-empty result. This path is
reachable in practice (e.g. the existing test harness calls .xs() on
the full arg before slicing to an empty proxy), so removing the check
entirely would reintroduce a reindex() failure in that case.

Also fixes a real bug found while testing: a non-empty user-supplied
proxy with duplicate index labels (via
to_dataframe(pcoll, proxy=df_with_dup_index)) crashed the old code with
'ValueError: Length mismatch', since drop_duplicates() shrinks the
index but not the frame before reassignment. Pre-slicing to iloc[:0]
before the dedup check resolves this.

Added regression test test_dataframe_xs_non_empty_duplicate_proxy
covering both DataFrame and Series non-empty duplicate-proxy cases.

Signed-off-by: ManvithPanyam <250704031+ManvithPanyam@users.noreply.github.com>

---------

Signed-off-by: ManvithPanyam <250704031+ManvithPanyam@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Sep 4, 2026
@pull pull Bot added the ⤵️ pull label Sep 4, 2026
@pull
pull Bot merged commit 51ea3f0 into section9-lab:master Sep 4, 2026
27 of 136 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants