csun5285 commented on code in PR #62960:
URL: https://github.com/apache/doris/pull/62960#discussion_r3214359563
##########
be/src/storage/key_coder.h:
##########
@@ -446,4 +448,47 @@ template <>
class KeyCoderTraits<FieldType::OLAP_FIELD_TYPE_DOUBLE>
: public KeyCoderTraitsForFloat<FieldType::OLAP_FIELD_TYPE_DOUBLE> {};
+// Convert a Field value to its storage representation (via
PrimitiveTypeConvertor)
+// and full-encode it as a byte-comparable ascending key via KeyCoder.
+template <PrimitiveType PT>
+inline void full_encode_field_as_key(const Field& f, const KeyCoder* coder,
std::string* buf) {
Review Comment:
1. RowCursor 里面特殊处理了 string 类型的padding,索引里面没有特殊处理,因为索引里面碰见 \0 就认为结束了,padding
没意义。
2. decimal类型的scale 不需要考虑,scale 只是缩放比例,同一列缩放比例一样,原始的 int 值比较大小就可以。
3. datetime 这种也不影响,他的scale 只是表示小数秒精度,存储 int 字典序 ≡ 时间先后序,不影响大小比较。
--
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]