Compilation error on updating join
mwylde opened this issue · comments
This query produces a compilation error due to overlapping field names in the output struct of the join:
CREATE TABLE m1 (
count INT,
status_code TEXT
) WITH (
connector = 'kafka',
format = 'json',
type = 'source',
bootstrap_servers = 'kafka:9092',
topic = 'logs'
);
CREATE TABLE m2 (
count INT,
status_code TEXT
) WITH (
connector = 'kafka',
format = 'json',
type = 'source',
bootstrap_servers = 'kafka:9092',
topic = 'logs'
);
SELECT m1.count as m1_count, m2.count as m2_count, m1.status_code as status_code
FROM m1 LEFT JOIN m2
ON m1.status_code = m2.status_code;
The compilation error:
error[E0124]: field `count` is already declared
--> pipeline/src/main.rs:470:5
|
468 | pub count: Option<i32>,
| ---------------------- `count` first declared here
469 | pub status_code: Option<String>,
470 | pub count: Option<i32>,
| ^^^^^^^^^^^^^^^^^^^^^^ field already declared
error[E0124]: field `status_code` is already declared
--> pipeline/src/main.rs:471:5
|
469 | pub status_code: Option<String>,
| ------------------------------- `status_code` first declared here
470 | pub count: Option<i32>,
471 | pub status_code: Option<String>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field already declared
Fixed in #288