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

feat: short sql length setting #16502

Open arkzuse opened 3 days ago

arkzuse commented 3 days ago

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

New setting for short length sql.

Tests

Type of change


This change isโ€‚Reviewable

BohuTANG commented 3 days ago

Hi @arkzuse

Thanks for the contribution! This PR is not yet ready for review, so I've converted it to a draft. Please mark it as 'READY' when you believe it's ready for review.

arkzuse commented 2 days ago

@BohuTANG sorry for the oversight. What can I do to make it review ready?

BohuTANG commented 2 days ago

@BohuTANG sorry for the oversight. What can I do to make it review ready?

Currently, the settings are only defined. We need to implement them in the short_sql func: https://github.com/datafuselabs/databend/blob/8eaf57b52cc56929291d5d3b25c696c0bd4a2252/src/common/base/src/base/string.rs#L196-L198

Something like short_sql(sql String, max_length: usize) ...

You can refer to other settings for guidance on how to get and set values.

Finally, please add a test for this PR. Once all tests pass, it will be ready for review, and the tests can reference the other settings.

BohuTANG commented 2 days ago

For you reference: https://github.com/BohuTANG/databend/commit/a3642b090264207ccf07282f50feb6c0c9d2440f

BohuTANG commented 16 hours ago

@arkzuse Hi, could you clarify why the PR was closed? Let me know if you need any help to continue.

arkzuse commented 16 hours ago

@BohuTANG I didn't close it. I am working on this pr and interested to contribute in future.

arkzuse commented 16 hours ago

Oh i deleted my local brach so it closed... sorry for inconvenience