Closed sunng87 closed 2 days ago
The changes introduce new columns (data_length
, index_length
, max_data_length
, and avg_row_length
) to the information_schema
tables in a database system. These modifications also involve updating related data structures, implementing display formatting for TableOptions
, and adjusting test outputs to reflect the new schema.
File | Change Summary |
---|---|
src/.../tables.rs |
Added constants and fields for new columns in information_schema along with vector builders. |
src/table/src/requests.rs |
Implemented fmt::Display for TableOptions and added tests for string conversion. |
tests/.../information_schema.result |
Updated test results for information_schema tables to include new columns. |
tests/.../create.result |
Updated output format in test results to include new columns in query results. |
None generated.
In coders' realm, where data gleams,
New columns rise to fulfill dreams,
Length and index, data's tale,
With tests aligned, they set the sail,
Options display in string's embrace,
Schema's wonder, a data chase.
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 78.97196%
with 45 lines
in your changes missing coverage. Please review.
Project coverage is 84.55%. Comparing base (
df0fff2
) to head (12157b4
). Report is 18 commits behind head on main.
I'm going refactor Session and QueryContext to use Arc<RwLock<>> for all modifiable fields, like time-zone, schema. This > makes the change automatically propagate from QueryContext to Session. The idea of QueryContext::update_session is > smart, but it's going to be difficult to maintain in future.
It may hurt performance, must be careful or do some benchmark.
There are many columns in tables
, see https://dev.mysql.com/doc/refman/8.4/en/information-schema-tables-table.html
I believe we should consider including all placeholders at this time.
It may hurt performance, must be careful or do some benchmark.
Should be ok because these data are all associated with a single database connection. Actually there is no concurrent access at all. Using locks is just to bypass rust compiler check.
@evenyag @fengjiachun Please take a look.
@evenyag just updated, please check again
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
This patch is to resolve compatibility issues with dbeaver client:
data_size
in information_schema.tablesuse
statement instead of modernuse
command which most other clients useThis patch fills these two gaps and make dbeaver client works for most cases. There is another statement to be supported:
SHOW TABLE STATUS FROM public LIKE 'system_metrics'
but it's not a blocking issue for our scenario.SHOW TABLE STATUS
is tracked in #3354This patch brings back
USE
statement support in #2022 as we finally found a real use-case for it. And it also makescurrent_schema
modifiable and propagate toSession
.The data fields of
information_schema.TABLES
in this patch are all for placeholder. I haven't fill real data into these fields. TODO item is left to future enhancement.Future work
I'm going refactor
Session
andQueryContext
to useArc<RwLock<>>
for all modifiable fields, like time-zone, schema. This makes the change automatically propagate fromQueryContext
toSession
. The idea ofQueryContext::update_session
is smart, but it's going to be difficult to maintain in future.Checklist
Summary by CodeRabbit
New Features
data_length
,max_data_length
,index_length
,avg_row_length
) in theinformation_schema
tables for enhanced data insight.Improvements
TableOptions
to improve readability.Tests
TableOptions
ensuring accurate display.Bug Fixes