Aliasing Left Side of Join Breaks Derivation
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start with the PRQL input and expected-versus-actual BigQuery SQL in the issue; trace how an aliased derived relation is represented through join compilation, then find the related tests. Reproduce the missing profit derivation and use the expected SQL as the completion criterion. The issue names no source files or tests, so locating the relevant compiler path will take project familiarity.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened?
Aliasing the left side of a join magically erases any derivations in that left side.
Without alias (seems to work):
prql target:sql.bigquery
from sales
derive {profit = sell_price - buy_price}
join side:left details (this.item_id == that.item_id)
select !{details.item_id}
With alias (doesn't work):
prql target:sql.bigquery
sales_with_profit = (
from sales
derive {profit = sell_price - buy_price}
)
join side:left details (this.item_id == that.item_id)
select !{details.item_id}
With the aliasing, the "profit" derivation completely disappears. That should not happen.
PRQL input
prql target:sql.bigquery
sales_with_profit = (
from sales
derive {profit = sell_price - buy_price}
)
join side:left details (this.item_id == that.item_id)
select !{details.item_id}
SQL output
WITH table_0 AS (
SELECT
*
FROM
sales
)
SELECT
table_0.*,
details.*
EXCEPT
(item_id)
FROM
table_0
LEFT JOIN details ON table_0.item_id = details.item_id
-- Generated by PRQL compiler version:0.11.2 (https://prql-lang.org/)
Expected SQL output
WITH table_0 AS (
SELECT
*,
sell_price - buy_price AS profit
FROM
sales
)
SELECT
table_0.*
EXCEPT
(profit),
details.*
EXCEPT
(item_id),
table_0.profit
FROM
table_0
LEFT JOIN details ON table_0.item_id = details.item_id
MVCE confirmation
- Minimal example
- New issue
Anything else?
No response
- Ngôn ngữ chính
- Rust
- Star
- 10.9k
- Fork
- 261
- Merge trung bình
- 3 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 84
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PRQL/prql
-
Underscore does not work as expectedCó thể đã có người làm @prql-bot đã nhận 3 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PRQL/prql#6518 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
prqlc Debug Report HTML Does Not Escape Source File Name, Enabling Stored XSS via PRQLC_DEBUG_LOGĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
PRQL/prql#6502 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Add `.prql` to linguistĐang mởfriendliness integrations
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
PRQL/prql#1636 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 12/100
PRQL/prql#6517 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
review-runs-tracking: 2026-11Đang mởreview-runs-tracking
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 5/100
PRQL/prql#6513 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
near/near-sdk-rs#1676 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
auto:producer auto:security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
fritzprix/libr-agent#2595 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:fs type:fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Tripstack-Corp/spyc#1002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
github_actions security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
dekobon/big-code-analysis#1815 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Detail Bug] Request logs can be forged via control characters in fetch object keys (log injection)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
s2-streamstore/cachey#211 ·
Maintainer thường phản hồi trong vòng 1 ngày