HappenLee commented on PR #66477: URL: https://github.com/apache/doris/pull/66477#issuecomment-5695533495
**[P1] Handle TIMESTAMP_NS in IDENTITY bucketing before accepting it as a distribution column** At commit `8774b5d426d4477a5f2d822201ec9509218af858`, FE accepts `TIMESTAMP_NS` as an IDENTITY distribution column, but [RawValue::identity_hash()](https://github.com/apache/doris/blob/8774b5d426d4477a5f2d822201ec9509218af858/be/src/util/raw_value.h#L96-L129) does not handle `TYPE_TIMESTAMP_NS`. The existing CRC32 implementation does handle this type as an 8-byte value. For example, the following table and non-null input expose the missing branch: ```sql CREATE TABLE identity_ts ( ts TIMESTAMP_NS NOT NULL, v INT ) DUPLICATE KEY(ts) DISTRIBUTED BY HASH(ts) BUCKETS 8 PROPERTIES("replication_num" = "1", "distribution_hash_type" = "identity"); INSERT INTO identity_ts VALUES ('2026-01-01 00:00:00.000000001', 1); ``` The [tablet routing path](https://github.com/apache/doris/blob/8774b5d426d4477a5f2d822201ec9509218af858/be/src/storage/tablet_info.h#L251-L261) passes the column's primitive type directly to `identity_hash()`, so a non-null TIMESTAMP_NS value reaches `default: DORIS_CHECK(false)`. This raises a FATAL_ERROR exception in release builds; builds without `NDEBUG` also execute `LOG(FATAL)`. Validation: a focused FE unit test confirmed that `HashDistributionDesc(..., HashType.IDENTITY).toDistributionInfo(...)` accepts a TIMESTAMP_NS column. The BE failure follows from the routing and type-dispatch code; I have not executed the SQL above on a running cluster. Please add TIMESTAMP_NS to the correct 8-byte encoding branch and cover write routing, tablet pruning, and bucket shuffle with this type. If the intended initial scope excludes it, reject that combination during DDL validation instead of accepting a table whose valid non-null input fails during routing. -- 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]
