You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/11/08 14:43:53 UTC

[GitHub] [doris] xiaokang commented on pull request #14061: [bug](ColumnDecimal)call set_decimalv2_type when cloning ColumnDecimal

xiaokang commented on PR #14061:
URL: https://github.com/apache/doris/pull/14061#issuecomment-1307329886

   > Could you also set `is_date` and `is_date_time` in `ColumnVector<T>::clone_resized` ?
   
   @Gabriel39 , there is already a copy_date_types for `is_date` and `is_date_time`. But I'm not sure if it's right to check for Int64 before calling copy_date_types in ColumnVector.
   
   be/src/vec/columns/column_vector.cpp
   `
   MutableColumnPtr ColumnVector<T>::clone_resized(size_t size) const {
       auto res = this->create();
       if constexpr (std::is_same_v<T, vectorized::Int64>) {
           res->copy_date_types(*this);
       }
       // ...
   `
   
   be/src/vec/columns/column.h
   `
       void copy_date_types(const IColumn& col) {
           if (col.is_date_type()) {
               set_date_type();
           }
           if (col.is_datetime_type()) {
               set_datetime_type();
           }
       }
   `
   


-- 
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-unsubscribe@doris.apache.org

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


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