datafuselabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.29k stars 701 forks source link

bug: Insert query with agg function return err #15355

Open TCeason opened 2 weeks ago

TCeason commented 2 weeks ago

Search before asking

Version

main

What's Wrong?

Err with BadArguments

How to Reproduce?

MySQL [(none)]> insert INTO t1 VALUES(max(1));
ERROR 1105 (HY000): PanicError. Code: 1104, Text = called `Result::unwrap()` on an `Err` value: BadArguments. Code: 1006, Text = Unable to get field named "18446744073709551615". Valid fields: ["id"].

   0: databend_common_exception::exception_backtrace::capture
             at src/common/exception/src/exception_backtrace.rs:72:17
   1: databend_common_exception::exception_code::<impl databend_common_exception::exception::ErrorCode>::BadArguments
             at src/common/exception/src/exception_code.rs:35:30
   2: databend

Are you willing to submit PR?