Skip to content

feat: supports decimal type in RPC#2788

Merged
evenyag merged 12 commits intoGreptimeTeam:developfrom
QuenKar:feat/decimal128-grpc
Nov 24, 2023
Merged

feat: supports decimal type in RPC#2788
evenyag merged 12 commits intoGreptimeTeam:developfrom
QuenKar:feat/decimal128-grpc

Conversation

@QuenKar
Copy link
Copy Markdown
Contributor

@QuenKar QuenKar commented Nov 21, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

main change:

  • Decimal128 grpc

refactor ColumnDataTypeWrapper

#[derive(Debug, PartialEq)]
pub struct ColumnDataTypeWrapper {
    datatype: ColumnDataType,
    datatype_ext: Option<ColumnDataTypeExtension>,
}
  • ColumnDataTypeWrapper can convert with ConcreteDataType.(refactor From/TryFrom trait).
  • we can use ColumnDataType::xxx_datatype() to create, as ConcreteDataType style.
  • use datatype() can get (ColumnDataType, Option<ColumnDataTypeExtension>) , which is needed by ColumnSchema ,ColumnDef and Column.
  • use try_new to construct a ColumnDataTypeWrapper.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

#2682
GreptimeTeam/greptime-proto#122

@QuenKar QuenKar marked this pull request as ready for review November 21, 2023 08:52
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 21, 2023

Codecov Report

Merging #2788 (9a67619) into develop (a7bbd61) will decrease coverage by 0.14%.
Report is 11 commits behind head on develop.
The diff coverage is 80.87%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2788      +/-   ##
===========================================
- Coverage    84.47%   84.34%   -0.14%     
===========================================
  Files          728      731       +3     
  Lines       113352   114517    +1165     
===========================================
+ Hits         95756    96587     +831     
- Misses       17596    17930     +334     

@QuenKar QuenKar requested a review from evenyag November 22, 2023 07:57
Comment thread Cargo.toml Outdated
Copy link
Copy Markdown
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll review the rest parts after the proto is updated.

Comment thread src/api/src/helper.rs
Copy link
Copy Markdown
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a feature and not only refactors the ColumnDataTypeWrapper. @QuenKar Could you edit the title? And I think it actually supports decimal type in RPC.

Comment thread src/api/src/helper.rs Outdated
Comment thread src/api/src/helper.rs
Comment thread src/api/src/helper.rs Outdated
Comment thread src/datatypes/src/types/decimal_type.rs
Comment thread src/mito2/src/memtable/key_values.rs Outdated
Comment thread src/mito2/src/memtable/key_values.rs Outdated
Comment thread src/mito2/src/request.rs Outdated
Comment thread src/operator/src/expr_factory.rs Outdated
Comment thread src/common/decimal/src/decimal128.rs Outdated
Comment thread src/operator/src/req_convert/common.rs Outdated
@QuenKar QuenKar changed the title refactor: ColumnDataTypeWrapper feat: supports decimal type in RPC Nov 24, 2023
Comment thread src/api/src/helper.rs
Comment thread src/api/src/helper.rs
Comment thread src/api/src/helper.rs
Comment thread src/api/src/helper.rs Outdated
Comment thread src/api/src/helper.rs
Comment thread src/datatypes/src/types/decimal_type.rs
Co-authored-by: Yingwen <realevenyag@gmail.com>
Comment thread src/mito2/src/memtable/time_series.rs Outdated
Co-authored-by: Yingwen <realevenyag@gmail.com>
Copy link
Copy Markdown
Member

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@evenyag evenyag enabled auto-merge November 24, 2023 09:10
@evenyag evenyag added this pull request to the merge queue Nov 24, 2023
Merged via the queue into GreptimeTeam:develop with commit 3a4c9f2 Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants