Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@priithaamer
Copy link
Contributor

Attempt to fix #5494

@eitsupi eitsupi changed the title Fix append regression fix: Fix append regression in 0.13.5 Oct 13, 2025
@eitsupi eitsupi requested a review from Copilot October 13, 2025 13:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a regression in the append functionality introduced in version 0.13.5. The fix addresses issue #5494 by improving the positional mapping logic for UNION operations in SQL generation.

  • Adds bounds checking to prevent invalid array access when applying positional mappings
  • Ensures positional mappings are only stored when complete (all columns matched)
  • Adds defensive programming with logging for better debugging

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

File Description
prqlc/prqlc/src/sql/pq/positional_mapping.rs Core fix adding bounds validation and completeness checks for positional mappings
prqlc/prqlc/tests/integration/queries/append_cte_complex.prql New test case demonstrating complex append scenarios with CTEs
Multiple snapshot files Updated test snapshots reflecting the regression fix and new test additions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@max-sixty
Copy link
Member

thanks @priithaamer . sorry for the regression.

let's merge? or any other feedback?

@max-sixty
Copy link
Member

I did the same re reducing the integration tests for this — https://github.com/max-sixty/prql/tree/fix-5494-append-regression (or I can push to this MR with perms)

@eitsupi
Copy link
Member

eitsupi commented Oct 25, 2025

@priithaamer Could you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

append regression in 0.13.5

3 participants