databendlabs / databend

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

feature: short sql length setting #16462

Open BohuTANG opened 1 week ago

BohuTANG commented 1 week ago

Summary

Now, the sql truncate to 128 bytes is too short for many cases, we can add a new settings for that. https://github.com/datafuselabs/databend/blob/8eaf57b52cc56929291d5d3b25c696c0bd4a2252/src/common/base/src/base/string.rs#L197

("short_sql_max_length", DefaultSettingValue {
    value: UserSettingValue::UInt64(128), // Default max length
    desc: "Sets the maximum length for truncating SQL queries in short_sql function.",
    mode: SettingMode::Both,
    range: Some(SettingRange::Numeric(1..=1024*1024)),
}),
arkzuse commented 4 days ago

hi, i would like to take this issue.

arkzuse commented 4 days ago

just want to make sure i have to add the setting to src/query/settings/src/settings_default.rs right. Is there anything else I need to consider?

arkzuse commented 13 hours ago

do we need a setter for this?