github-actions[bot] commented on code in PR #24603:
URL: https://github.com/apache/doris/pull/24603#discussion_r1360065774
##########
be/src/vec/data_types/data_type_agg_state.h:
##########
@@ -73,7 +75,9 @@ class DataTypeAggState : public DataTypeString {
TypeIndex get_type_id() const override { return TypeIndex::AggState; }
- PrimitiveType get_type_as_primitive_type() const override { return
TYPE_AGG_STATE; }
+ TypeDescriptor get_type_as_type_descriptor() const override {
+ return TypeDescriptor(TYPE_AGG_STATE);
Review Comment:
warning: avoid repeating the return type from the declaration; use a braced
initializer list instead [modernize-return-braced-init-list]
```suggestion
return {TYPE_AGG_STATE};
```
##########
be/src/vec/data_types/data_type_time.h:
##########
@@ -53,7 +53,9 @@ class DataTypeTime final : public DataTypeNumberBase<Float64>
{
bool equals(const IDataType& rhs) const override;
std::string to_string(const IColumn& column, size_t row_num) const
override;
- PrimitiveType get_type_as_primitive_type() const override { return
TYPE_TIME; }
+ TypeDescriptor get_type_as_type_descriptor() const override {
Review Comment:
warning: method 'get_type_as_type_descriptor' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static TypeDescriptor get_type_as_type_descriptor() override {
```
##########
be/src/vec/data_types/data_type_time.h:
##########
@@ -53,7 +53,9 @@ class DataTypeTime final : public DataTypeNumberBase<Float64>
{
bool equals(const IDataType& rhs) const override;
std::string to_string(const IColumn& column, size_t row_num) const
override;
- PrimitiveType get_type_as_primitive_type() const override { return
TYPE_TIME; }
+ TypeDescriptor get_type_as_type_descriptor() const override {
+ return TypeDescriptor(TYPE_TIME);
Review Comment:
warning: avoid repeating the return type from the declaration; use a braced
initializer list instead [modernize-return-braced-init-list]
```suggestion
return {TYPE_TIME};
```
##########
be/src/vec/data_types/data_type_object.h:
##########
@@ -53,7 +54,9 @@ class DataTypeObject : public IDataType {
DataTypeObject(const String& schema_format_, bool is_nullable_);
const char* get_family_name() const override { return "Variant"; }
TypeIndex get_type_id() const override { return TypeIndex::VARIANT; }
- PrimitiveType get_type_as_primitive_type() const override { return
TYPE_VARIANT; }
+ TypeDescriptor get_type_as_type_descriptor() const override {
+ return TypeDescriptor(TYPE_VARIANT);
Review Comment:
warning: avoid repeating the return type from the declaration; use a braced
initializer list instead [modernize-return-braced-init-list]
```suggestion
return {TYPE_VARIANT};
```
##########
be/src/vec/data_types/data_type_time.h:
##########
@@ -85,7 +87,9 @@ class DataTypeTimeV2 final : public
DataTypeNumberBase<Float64> {
bool equals(const IDataType& rhs) const override;
std::string to_string(const IColumn& column, size_t row_num) const
override;
- PrimitiveType get_type_as_primitive_type() const override { return
TYPE_TIMEV2; }
+ TypeDescriptor get_type_as_type_descriptor() const override {
+ return TypeDescriptor(TYPE_TIMEV2);
Review Comment:
warning: avoid repeating the return type from the declaration; use a braced
initializer list instead [modernize-return-braced-init-list]
```suggestion
return {TYPE_TIMEV2};
```
##########
be/src/vec/data_types/data_type_time.h:
##########
@@ -85,7 +87,9 @@ class DataTypeTimeV2 final : public
DataTypeNumberBase<Float64> {
bool equals(const IDataType& rhs) const override;
std::string to_string(const IColumn& column, size_t row_num) const
override;
- PrimitiveType get_type_as_primitive_type() const override { return
TYPE_TIMEV2; }
+ TypeDescriptor get_type_as_type_descriptor() const override {
Review Comment:
warning: method 'get_type_as_type_descriptor' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static TypeDescriptor get_type_as_type_descriptor() override {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]