Skip to content

[REFACTOR] Inline PathSegment and expand the Check docstring#571

Open
Seth Fitzsimmons (sethfitz) wants to merge 2 commits into
pyspark-expression-codegenfrom
pyspark-review-followups
Open

[REFACTOR] Inline PathSegment and expand the Check docstring#571
Seth Fitzsimmons (sethfitz) wants to merge 2 commits into
pyspark-expression-codegenfrom
pyspark-review-followups

Conversation

@sethfitz

Copy link
Copy Markdown
Collaborator

Follows up Victor Schappert (@vcschapp)'s review of #518 (superseded by #569), addressing the two actionable inline comments. The naming and map-generality threads from that review are tracked separately in #570.

  • Inline the PathSegment alias (StructSegment | ArraySegment) at its two use sites and drop it. FieldSegment already names the general Struct | Array | Map case, so PathSegment was a misleading middle name for a subset that excludes MapSegment.
  • Expand the Check docstring to relate expr (the single composed Column) and read_columns (its read-set), and to say why they are carried separately.

No behavior change. Stacked on pyspark-expression-codegen (#569); the base retargets to main when #569 merges.

Related: #570

PathSegment named the StructSegment | ArraySegment subset, while
FieldSegment names the full StructSegment | ArraySegment | MapSegment
set.  Side by side, PathSegment read as a misleading middle name for
something that excludes MapSegment. It was used at two sites, so inline
the union and drop the alias.

Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
expr and read_columns are two views of one computation: expr is the
single composed Column, read_columns its read-set. The docstring now
explains why they are carried separately, since the builder knows the
columns as it composes expr and records them rather than recovering them
from the finished Column.

Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
@github-actions

Copy link
Copy Markdown

🗺️ Schema reference docs preview is live!

🌍 Preview https://staging.overturemaps.org/schema/pr/571/schema/index.html
🕐 Updated Jul 17, 2026 19:51 UTC
📝 Commit 8a69d4b
🔧 env SCHEMA_PREVIEW true

Note

♻️ This preview updates automatically with each push to this PR.

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.

1 participant