risinglightdb / risinglight

An educational OLAP database system.
Apache License 2.0
1.59k stars 211 forks source link

`select *` panic in subquery #820

Closed skyzh closed 4 months ago

skyzh commented 9 months ago
> create table t1(v1 int, v2 int);
> explain select * from (select v1 + v1 as v3 from t1) as left;
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/planner/rules/plan.rs:266:51
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
caicancai commented 9 months ago

It's possible to return a default value when capturing None, I'm not sure that's a good idea

wangrunji0408 commented 9 months ago

This bug has been fixed in #796. However, it has not been merged for a long time. 🥲 I can't recall too many details for now. But in my mind, this involves a tricky way how we handle the output of subquery. I might write an article to explain it in detail. (

caicancai commented 9 months ago

This bug has been fixed in #796. However, it has not been merged for a long time. 🥲 I can't recall too much details for now. But in my mind, this involves a tricky way how we handle the output of subquery. I might write an article to explain it in detail. (

796 looks very cool, looking forward to the author’s article

wangrunji0408 commented 4 months ago

fixed by #796