github-actions[bot] commented on code in PR #69120:
URL: https://github.com/apache/doris/pull/69120#discussion_r4281085831
##########
be/src/core/column/column_vector.h:
##########
@@ -413,7 +413,13 @@ class ColumnVector final : public COWHelper<IColumn,
ColumnVector<T>> {
// when run function which need_replace_null_data_to_default, use the
value far from 0 to avoid
// raise errors for null cell.
static value_type default_value() {
- if constexpr (is_date_type(T) || T == PrimitiveType::TYPE_TIMESTAMPTZ)
{
+ if constexpr (T == PrimitiveType::TYPE_DATE) {
+ return PrimitiveTypeTraits<T>::CppType::DATE_DEFAULT_VALUE;
+ } else if constexpr (T == PrimitiveType::TYPE_DATETIME) {
+ return PrimitiveTypeTraits<T>::CppType::DATETIME_DEFAULT_VALUE;
Review Comment:
[P1] Preserve legacy temporal NULL shuffle hashes during upgrades
These defaults also feed
`ColumnVector::update_crc32c_batch_default_on_null()` through
`ColumnNullable::update_crc32c_batch()`. Previously the invalid tag made
`to_buffer()` return zero bytes for a NULL DATE/DATETIME; the corrected
defaults now hash `1970-01-01` or `1970-01-01 00:00:00`.
`Crc32CHashPartitioner` uses that hash for remote exchanges when
`enable_new_shuffle_hash_method=true` (the default), with no version gate. With
four reducers, the old NULL hash maps to channel 0 and either new hash maps to
channel 2. During a rolling upgrade, a distributed `SELECT d, COUNT(*) FROM t
GROUP BY d` on nullable legacy DATE/DATETIME can therefore return two NULL
groups with partial counts. Keep the valid execution defaults, but preserve the
legacy NULL hash separately or negotiate the hash semantics for the whole query.
--
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]