github-actions[bot] commented on code in PR #24603:
URL: https://github.com/apache/doris/pull/24603#discussion_r1333974315


##########
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 {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_date.h:
##########
@@ -47,7 +47,9 @@ namespace doris::vectorized {
 class DataTypeDate final : public DataTypeNumberBase<Int64> {
 public:
     TypeIndex get_type_id() const override { return TypeIndex::Date; }
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_DATE; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_array.h:
##########
@@ -58,8 +59,11 @@ class DataTypeArray final : public IDataType {
     DataTypeArray(const DataTypePtr& nested_);
 
     TypeIndex get_type_id() const override { return TypeIndex::Array; }
-
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_ARRAY; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_jsonb.h:
##########
@@ -53,7 +53,9 @@ class DataTypeJsonb final : public IDataType {
 
     const char* get_family_name() const override { return "JSONB"; }
     TypeIndex get_type_id() const override { return TypeIndex::JSONB; }
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_JSONB; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_string.h:
##########
@@ -56,7 +56,9 @@ class DataTypeString : public IDataType {
 
     TypeIndex get_type_id() const override { return TypeIndex::String; }
 
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_STRING; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_quantilestate.h:
##########
@@ -53,7 +53,9 @@ class DataTypeQuantileState : public IDataType {
     const char* get_family_name() const override { return "QuantileState"; }
 
     TypeIndex get_type_id() const override { return TypeIndex::QuantileState; }
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_QUANTILE_STATE; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_time.h:
##########
@@ -85,7 +87,9 @@
     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: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_bitmap.h:
##########
@@ -57,7 +57,9 @@ class DataTypeBitMap : public IDataType {
 
     TypeIndex get_type_id() const override { return TypeIndex::BitMap; }
 
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_OBJECT; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_number_base.h:
##########
@@ -65,33 +65,39 @@ class DataTypeNumberBase : public IDataType {
 
     const char* get_family_name() const override { return TypeName<T>::get(); }
     TypeIndex get_type_id() const override { return TypeId<T>::value; }
-    PrimitiveType get_type_as_primitive_type() const override {
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/util/arrow/row_batch.cpp:
##########
@@ -133,6 +137,20 @@ Status convert_to_arrow_field(SlotDescriptor* desc, 
std::shared_ptr<arrow::Field
     return Status::OK();
 }
 
+Status get_block_arrow_schema(const vectorized::Block& block,
+                              std::shared_ptr<arrow::Schema>* result) {
+    std::vector<std::shared_ptr<arrow::Field>> fields;

Review Comment:
   warning: variable 'fields' is not initialized 
[cppcoreguidelines-init-variables]
   
   ```suggestion
       std::vector<std::shared_ptr<arrow::Field>> fields = 0;
   ```
   



##########
be/src/vec/data_types/data_type_hll.h:
##########
@@ -56,7 +56,7 @@ class DataTypeHLL : public IDataType {
     const char* get_family_name() const override { return "HLL"; }
 
     TypeIndex get_type_id() const override { return TypeIndex::HLL; }
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_HLL; }
+    TypeDescriptor get_type_as_type_descriptor() const override { return 
TypeDescriptor(TYPE_HLL); }

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override { return TypeDescriptor(TYPE_HLL); }
   ```
   



##########
be/src/vec/data_types/data_type_date_time.h:
##########
@@ -73,7 +73,9 @@ class DataTypeDateTime final : public 
DataTypeNumberBase<Int64> {
     const char* get_family_name() const override { return "DateTime"; }
     std::string do_get_name() const override { return "DateTime"; }
     TypeIndex get_type_id() const override { return TypeIndex::DateTime; }
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_DATETIME; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
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 {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
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 {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_fixed_length_object.h:
##########
@@ -52,7 +52,9 @@ class DataTypeFixedLengthObject final : public IDataType {
 
     TypeIndex get_type_id() const override { return 
TypeIndex::FixedLengthObject; }
 
-    PrimitiveType get_type_as_primitive_type() const override { return 
INVALID_TYPE; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_decimal.h:
##########
@@ -145,17 +146,20 @@ class DataTypeDecimal final : public IDataType {
     const char* get_family_name() const override { return "Decimal"; }
     std::string do_get_name() const override;
     TypeIndex get_type_id() const override { return TypeId<T>::value; }
-    PrimitiveType get_type_as_primitive_type() const override {
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_time_v2.h:
##########
@@ -58,7 +58,9 @@ namespace doris::vectorized {
 class DataTypeDateV2 final : public DataTypeNumberBase<UInt32> {
 public:
     TypeIndex get_type_id() const override { return TypeIndex::DateV2; }
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_DATEV2; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
override {
   ```
   



##########
be/src/vec/data_types/data_type_time_v2.h:
##########
@@ -110,7 +112,9 @@
 
     DataTypeDateTimeV2(const DataTypeDateTimeV2& rhs) : _scale(rhs._scale) {}
     TypeIndex get_type_id() const override { return TypeIndex::DateTimeV2; }
-    PrimitiveType get_type_as_primitive_type() const override { return 
TYPE_DATETIMEV2; }
+    TypeDescriptor get_type_as_type_descriptor() const override {

Review Comment:
   warning: function 'get_type_as_type_descriptor' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] TypeDescriptor get_type_as_type_descriptor() const 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to