Skip to content

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

Merged
Victor Schappert (vcschapp) merged 2 commits into
mainfrom
pyspark-review-followups
Jul 22, 2026
Merged

[REFACTOR] Inline PathSegment and expand the Check docstring#571
Victor Schappert (vcschapp) merged 2 commits into
mainfrom
pyspark-review-followups

Conversation

@sethfitz

@sethfitz Seth Fitzsimmons (sethfitz) commented Jul 17, 2026

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.

Closes #586
Related: #570

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

🗺️ Schema reference docs preview is live!

🌍 Preview https://staging.overturemaps.org/schema/pr/571/schema/index.html
🕐 Updated Jul 22, 2026 15:30 UTC
📝 Commit fb155b8
🔧 env SCHEMA_PREVIEW true

Note

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

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>

@vcschapp Victor Schappert (vcschapp) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, one suggestion for the check.py docs. I'm not passionate about it, but IMO it'd convey the meaning better. 👇

Comment thread packages/overture-schema-pyspark/src/overture/schema/pyspark/check.py Outdated
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>
@vcschapp
Victor Schappert (vcschapp) merged commit 919670a into main Jul 22, 2026
23 of 24 checks passed
@vcschapp
Victor Schappert (vcschapp) deleted the pyspark-review-followups branch July 22, 2026 15:40
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.

Address remaining actionable comments from the #518 pyspark review

3 participants