-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Fix](Serde) Fix content displayed by complex types in MySQL Client #25946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3699f5f
d51c389
86f3803
7535bc3
e42e7b5
e657243
e539538
8c9101f
1f8ae91
c9c3c53
347db0b
04feef0
b9886de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -86,8 +86,8 @@ class DataTypeDateTime final : public DataTypeNumberBase<Int64> { | |||||
|
|
||||||
| std::string to_string(const IColumn& column, size_t row_num) const override; | ||||||
|
|
||||||
| DataTypeSerDeSPtr get_serde() const override { | ||||||
| return std::make_shared<DataTypeDateTimeSerDe>(); | ||||||
| DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: method 'get_serde' can be made static [readability-convert-member-functions-to-static]
Suggested change
|
||||||
| return std::make_shared<DataTypeDateTimeSerDe>(nesting_level); | ||||||
| } | ||||||
|
|
||||||
| Field get_field(const TExprNode& node) const override { | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -64,7 +64,9 @@ class DataTypeIPv4 final : public DataTypeNumberBase<IPv4> { | |||||
|
|
||||||
| MutableColumnPtr create_column() const override; | ||||||
|
|
||||||
| DataTypeSerDeSPtr get_serde() const override { return std::make_shared<DataTypeIPv4SerDe>(); } | ||||||
| DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: method 'get_serde' can be made static [readability-convert-member-functions-to-static]
Suggested change
|
||||||
| return std::make_shared<DataTypeIPv4SerDe>(nesting_level); | ||||||
| } | ||||||
| }; | ||||||
|
|
||||||
| template <typename DataType> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -72,7 +72,9 @@ class DataTypeIPv6 final : public DataTypeNumberBase<IPv6> { | |||||
|
|
||||||
| MutableColumnPtr create_column() const override; | ||||||
|
|
||||||
| DataTypeSerDeSPtr get_serde() const override { return std::make_shared<DataTypeIPv6SerDe>(); } | ||||||
| DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: method 'get_serde' can be made static [readability-convert-member-functions-to-static]
Suggested change
|
||||||
| return std::make_shared<DataTypeIPv6SerDe>(nesting_level); | ||||||
| } | ||||||
| }; | ||||||
|
|
||||||
| template <typename DataType> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -69,7 +69,9 @@ class DataTypeTime final : public DataTypeNumberBase<Float64> { | |||||
| bool can_be_used_in_boolean_context() const override { return true; } | ||||||
| bool can_be_inside_nullable() const override { return true; } | ||||||
|
|
||||||
| DataTypeSerDeSPtr get_serde() const override { return std::make_shared<DataTypeTimeSerDe>(); }; | ||||||
| DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: method 'get_serde' can be made static [readability-convert-member-functions-to-static]
Suggested change
|
||||||
| return std::make_shared<DataTypeTimeSerDe>(nesting_level); | ||||||
| }; | ||||||
| TypeIndex get_type_id() const override { return TypeIndex::Time; } | ||||||
| const char* get_family_name() const override { return "time"; } | ||||||
| }; | ||||||
|
|
@@ -104,8 +106,8 @@ class DataTypeTimeV2 final : public DataTypeNumberBase<Float64> { | |||||
| bool can_be_inside_nullable() const override { return true; } | ||||||
|
|
||||||
| void to_pb_column_meta(PColumnMeta* col_meta) const override; | ||||||
| DataTypeSerDeSPtr get_serde() const override { | ||||||
| return std::make_shared<DataTypeTimeV2SerDe>(_scale); | ||||||
| DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override { | ||||||
| return std::make_shared<DataTypeTimeV2SerDe>(_scale, nesting_level); | ||||||
| }; | ||||||
| TypeIndex get_type_id() const override { return TypeIndex::TimeV2; } | ||||||
| const char* get_family_name() const override { return "timev2"; } | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -69,7 +69,9 @@ class DataTypeDateV2 final : public DataTypeNumberBase<UInt32> { | |||||
|
|
||||||
| bool can_be_inside_nullable() const override { return true; } | ||||||
|
|
||||||
| DataTypeSerDeSPtr get_serde() const override { return std::make_shared<DataTypeDateV2SerDe>(); } | ||||||
| DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: method 'get_serde' can be made static [readability-convert-member-functions-to-static]
Suggested change
|
||||||
| return std::make_shared<DataTypeDateV2SerDe>(nesting_level); | ||||||
| } | ||||||
|
|
||||||
| Field get_field(const TExprNode& node) const override { | ||||||
| DateV2Value<DateV2ValueType> value; | ||||||
|
|
@@ -127,8 +129,8 @@ class DataTypeDateTimeV2 final : public DataTypeNumberBase<UInt64> { | |||||
| std::string to_string(const IColumn& column, size_t row_num) const override; | ||||||
| void to_string(const IColumn& column, size_t row_num, BufferWritable& ostr) const override; | ||||||
| Status from_string(ReadBuffer& rb, IColumn* column) const override; | ||||||
| DataTypeSerDeSPtr get_serde() const override { | ||||||
| return std::make_shared<DataTypeDateTimeV2SerDe>(_scale); | ||||||
| DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override { | ||||||
| return std::make_shared<DataTypeDateTimeV2SerDe>(_scale, nesting_level); | ||||||
| }; | ||||||
|
|
||||||
| Field get_field(const TExprNode& node) const override { | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: method 'get_serde' can be made static [readability-convert-member-functions-to-static]