Skip to content

Commit ae0146a

Browse files
committed
add comment for ignore float/double when compute hash code
1 parent 9bb5f4b commit ae0146a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

be/src/olap/row.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ uint32_t hash_row(const RowType& row, uint32_t seed) {
189189
FieldType type;
190190
for (uint32_t cid : row.schema()->column_ids()) {
191191
type = row.schema()->column(cid)->type();
192-
if (type == OLAP_FIELD_TYPE_FLOAT || type == OLAP_FIELD_TYPE_DOUBLE) {
192+
//The approximation of float/double in a certain precision range, the binary of byte is not
193+
//a fixed value, so these two types are ignored in calculating hash code.
194+
if (type == OLAP_FIELD_TYPE_FLOAT || type == OLAP_FIELD_TYPE_DOUBLE) {
193195
continue;
194196
}
195197
seed = row.schema()->column(cid)->hash_code(row.cell(cid), seed);

0 commit comments

Comments
 (0)