susumu.yata
null+****@clear*****
Fri Dec 26 13:54:08 JST 2014
susumu.yata 2014-12-26 13:54:08 +0900 (Fri, 26 Dec 2014) New Revision: ee657e279633617d746863ed87036960b6990402 https://github.com/groonga/grnxx/commit/ee657e279633617d746863ed87036960b6990402 Message: Fix a bug that N/A values are inserted into a new index. (#135) Modified files: lib/grnxx/impl/index.cpp Modified: lib/grnxx/impl/index.cpp (+9 -3) =================================================================== --- lib/grnxx/impl/index.cpp 2014-12-26 13:40:04 +0900 (dfd4aca) +++ lib/grnxx/impl/index.cpp 2014-12-26 13:54:08 +0900 (16c7d36) @@ -352,7 +352,9 @@ TreeIndex<Int>::TreeIndex(ColumnBase *column, values.resize(records.size()); typed_column->read(records, values.ref()); for (size_t i = 0; i < count; ++i) { - insert(records[i].row_id, values[i]); + if (!values[i].is_na()) { + insert(records[i].row_id, values[i]); + } } records.clear(); } @@ -530,7 +532,9 @@ TreeIndex<Float>::TreeIndex(ColumnBase *column, values.resize(records.size()); typed_column->read(records, values.ref()); for (size_t i = 0; i < count; ++i) { - insert(records[i].row_id, values[i]); + if (!values[i].is_na()) { + insert(records[i].row_id, values[i]); + } } records.clear(); } @@ -713,7 +717,9 @@ TreeIndex<Text>::TreeIndex(ColumnBase *column, values.resize(records.size()); typed_column->read(records, values.ref()); for (size_t i = 0; i < count; ++i) { - insert(records[i].row_id, values[i]); + if (!values[i].is_na()) { + insert(records[i].row_id, values[i]); + } } records.clear(); } -------------- next part -------------- HTML����������������������������... Download