Conversation
a09b76b to
350c33b
Compare
|
The second commit is worth discussing: |
8ab4cd3 to
755ba66
Compare
|
thanks for the PR @nightscape ! overall looks good! I'm a bit worried about the "identical tables have very different behavior from almost-identical tables", though. I haven't looked enough in detail, but how much of a step back would this be: diff --git a/prqlc/prqlc/src/semantic/resolver/transforms.rs b/prqlc/prqlc/src/semantic/resolver/transforms.rs
index 5f07a7499c01..xxxxx 100644
--- a/prqlc/prqlc/src/semantic/resolver/transforms.rs
+++ b/prqlc/prqlc/src/semantic/resolver/transforms.rs
@@ -757,14 +757,12 @@ fn append(mut top: Lineage, bottom: Lineage) -> Result<Lineage, Error> {
except: except_b,
},
) => {
- // If both are All columns from the same input, merge the except sets
- // Otherwise, keep the top's input_id
- // Note: In a union, both inputs should be available, so we keep top's
+ // Merge except sets from both tables
+ // This preserves exclusion information even when input_ids differ
+ // (e.g., "from employees select !{name}" append "from managers select !{salary}")
let mut except = except_t;
- if input_id_t == input_id_b {
- // Same input, merge except sets
- except.extend(except_b);
- }
+ except.extend(except_b);
+
LineageColumn::All {
input_id: input_id_t,
except,(for transparency Claude helped me with the diff) |
755ba66 to
93f05c4
Compare
93f05c4 to
aee2bd2
Compare
|
@max-sixty I applied your proposed change and ran the tests, everything still green 👍 |
|
thank you! |
Fixes lineage tracking for
append(UNION) operations to correctly track inputs from both source tables.Previously, when using
appendto union two tables, the lineage only tracked the top table's inputs. Theappendfunction now mergesbottom.inputsintotop.inputs(similar to howjoinhandles inputs), ensuring both source tables are tracked.Added test to verify both inputs are tracked and column-level lineage works correctly.