ion-elgreco commented on issue #15351: URL: https://github.com/apache/datafusion/issues/15351#issuecomment-2746134153
@goldmedal this is is the initial projection:
```rust
crates/core/src/operations/merge/mod.rs:1270:5] &new_columns = [
(
"__delta_rs_c_foo",
Case(
Case {
expr: Some(
Column(
Column {
relation: None,
name: "__delta_rs_operation",
},
),
),
when_then_expr: [
(
Literal(
Int32(0),
),
Column(
Column {
relation: Some(
Bare {
table: "s",
},
),
name: "foo",
},
),
),
(
Literal(
Int32(1),
),
Column(
Column {
relation: Some(
Bare {
table: "s",
},
),
name: "foo",
},
),
),
(
Literal(
Int32(2),
),
Column(
Column {
relation: Some(
Bare {
table: "t",
},
),
name: "foo",
},
),
),
(
Literal(
Int32(3),
),
Column(
Column {
relation: Some(
Bare {
table: "t",
},
),
name: "foo",
},
),
),
(
Literal(
Int32(4),
),
Column(
Column {
relation: Some(
Bare {
table: "t",
},
),
name: "foo",
},
),
),
],
else_expr: None,
},
),
),
(
"__delta_rs_c_bar",
Case(
Case {
expr: Some(
Column(
Column {
relation: None,
name: "__delta_rs_operation",
},
),
),
when_then_expr: [
(
Literal(
Int32(0),
),
Column(
Column {
relation: Some(
Bare {
table: "s",
},
),
name: "bar",
},
),
),
(
Literal(
Int32(1),
),
Column(
Column {
relation: Some(
Bare {
table: "s",
},
),
name: "bar",
},
),
),
(
Literal(
Int32(2),
),
Column(
Column {
relation: Some(
Bare {
table: "t",
},
),
name: "bar",
},
),
),
(
Literal(
Int32(3),
),
Column(
Column {
relation: Some(
Bare {
table: "t",
},
),
name: "bar",
},
),
),
(
Literal(
Int32(4),
),
Column(
Column {
relation: Some(
Bare {
table: "t",
},
),
name: "bar",
},
),
),
],
else_expr: None,
},
),
),
```
this the final write_projection:
```rust
[crates/core/src/operations/merge/mod.rs:1306:5] &write_projection = [
Cast(
Cast {
expr: Alias(
Alias {
expr: Column(
Column {
relation: None,
name: "__delta_rs_c_foo",
},
),
relation: None,
name: "foo",
},
),
data_type: Int64,
},
),
Cast(
Cast {
expr: Alias(
Alias {
expr: Column(
Column {
relation: None,
name: "__delta_rs_c_bar",
},
),
relation: None,
name: "bar",
},
),
data_type: Map(
Field {
name: "key_value",
data_type: Struct(
[
Field {
name: "key",
data_type: Utf8,
nullable: false,
dict_id: 0,
dict_is_ordered: false,
metadata: {},
},
Field {
name: "value",
data_type: Float64,
nullable: true,
dict_id: 0,
dict_is_ordered: false,
metadata: {},
},
],
),
nullable: false,
dict_id: 0,
dict_is_ordered: false,
metadata: {},
},
false,
),
},
),
]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
