@@ -59,10 +59,6 @@ bool equal_row(const std::vector<uint32_t>& ids,
59
59
template <typename LhsRowType, typename RhsRowType>
60
60
int compare_row (const LhsRowType& lhs, const RhsRowType& rhs) {
61
61
for (uint32_t cid = 0 ; cid < lhs.schema ()->num_key_columns (); ++cid) {
62
- // because the num_column_ids include the column of double/float type
63
- if (lhs.schema ()->column (cid) == NULL ) {
64
- continue ;
65
- }
66
62
auto res = lhs.schema ()->column (cid)->compare_cell (lhs.cell (cid), rhs.cell (cid));
67
63
if (res != 0 ) {
68
64
return res;
@@ -80,10 +76,6 @@ template<typename LhsRowType, typename RhsRowType>
80
76
int compare_row_key (const LhsRowType& lhs, const RhsRowType& rhs) {
81
77
auto cmp_cids = std::min (lhs.schema ()->num_column_ids (), rhs.schema ()->num_column_ids ());
82
78
for (uint32_t cid = 0 ; cid < cmp_cids; ++cid) {
83
- // because the num_column_ids include the column of double/float type
84
- if (lhs.schema ()->column (cid) == NULL ) {
85
- continue ;
86
- }
87
79
auto res = lhs.schema ()->column (cid)->compare_cell (lhs.cell (cid), rhs.cell (cid));
88
80
if (res != 0 ) {
89
81
return res;
@@ -194,7 +186,12 @@ void agg_finalize_row(const std::vector<uint32_t>& ids, RowType* row, MemPool* m
194
186
195
187
template <typename RowType>
196
188
uint32_t hash_row (const RowType& row, uint32_t seed) {
189
+ FieldType type;
197
190
for (uint32_t cid : row.schema ()->column_ids ()) {
191
+ type = row.schema ()->column (cid)->type ();
192
+ if (type == OLAP_FIELD_TYPE_FLOAT || type == OLAP_FIELD_TYPE_DOUBLE) {
193
+ continue ;
194
+ }
198
195
seed = row.schema ()->column (cid)->hash_code (row.cell (cid), seed);
199
196
}
200
197
return seed;
0 commit comments