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/04/07 03:01:41 UTC

[GitHub] [incubator-doris] wangbo commented on pull request #8872: [Bug] [Storage-Vectorized] query get wrong result when read datetime type column

wangbo commented on PR #8872:
URL: https://github.com/apache/incubator-doris/pull/8872#issuecomment-1091028208

   ```
       case OLAP_FIELD_TYPE_DATETIME: {
           auto column_int = assert_cast<vectorized::ColumnVector<vectorized::Int64>*>(column);
   
           for (uint32_t j = 0; j < selected_size; ++j) {
               if (!nullable_mark_array[j]) {
                   uint32_t row_idx = j + start;
                   auto ptr = reinterpret_cast<const char*>(batch->cell_ptr(row_idx));
   
                   uint64_t value = *reinterpret_cast<const uint64_t*>(ptr);
                   vectorized::VecDateTimeValue data(value);
                   (column_int)->insert_data(reinterpret_cast<char*>(&data), 0);
               } else {
                   column_int->insert_default();
               }
           }
           break;
       }
   ```
   It seems that the code in ```row_block2.cpp``` should also be fixed.


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