[Groonga-commit] groonga/grnxx at 40bd4ce [master] Update tests to use the new interface raw(). (#116)

Zurück zum Archiv-Index

susumu.yata null+****@clear*****
Tue Dec 16 10:59:47 JST 2014


susumu.yata	2014-11-25 12:57:12 +0900 (Tue, 25 Nov 2014)

  New Revision: 40bd4ce2090109e671ce40f7e04daa19016eab43
  https://github.com/groonga/grnxx/commit/40bd4ce2090109e671ce40f7e04daa19016eab43

  Message:
    Update tests to use the new interface raw(). (#116)

  Modified files:
    test/test_array.cpp
    test/test_column.cpp
    test/test_data_types.cpp
    test/test_expression.cpp
    test/test_issue_62.cpp
    test/test_merger.cpp
    test/test_pipeline.cpp
    test/test_sorter.cpp
    test/test_table.cpp

  Modified: test/test_array.cpp (+15 -15)
===================================================================
--- test/test_array.cpp    2014-11-25 12:49:26 +0900 (92075e7)
+++ test/test_array.cpp    2014-11-25 12:57:12 +0900 (b34e04d)
@@ -102,29 +102,29 @@ void test_int() {
   array.push_back(grnxx::Int(123));
   assert(array.size() == 1);
   assert(array.capacity() == 1);
-  assert(array[0].value() == 123);
+  assert(array[0].raw() == 123);
 
   array.push_back(grnxx::Int(456));
   assert(array.size() == 2);
   assert(array.capacity() == 2);
-  assert(array[0].value() == 123);
-  assert(array[1].value() == 456);
+  assert(array[0].raw() == 123);
+  assert(array[1].raw() == 456);
 
   array.push_back(grnxx::Int(789));
   assert(array.size() == 3);
   assert(array.capacity() == 4);
-  assert(array[0].value() == 123);
-  assert(array[1].value() == 456);
-  assert(array[2].value() == 789);
+  assert(array[0].raw() == 123);
+  assert(array[1].raw() == 456);
+  assert(array[2].raw() == 789);
 
   array.resize(200, grnxx::Int(12345));
   assert(array.size() == 200);
   assert(array.capacity() == 200);
-  assert(array[0].value() == 123);
-  assert(array[1].value() == 456);
-  assert(array[2].value() == 789);
+  assert(array[0].raw() == 123);
+  assert(array[1].raw() == 456);
+  assert(array[2].raw() == 789);
   for (size_t i = 3; i < 200; ++i) {
-    assert(array[i].value() == 12345);
+    assert(array[i].raw() == 12345);
   }
 
   constexpr size_t ARRAY_SIZE = 1 << 20;
@@ -132,14 +132,14 @@ void test_int() {
   array.resize(ARRAY_SIZE, grnxx::Int(0));
   assert(array.size() == ARRAY_SIZE);
   assert(array.capacity() == ARRAY_SIZE);
-  assert(array[0].value() == 123);
-  assert(array[1].value() == 456);
-  assert(array[2].value() == 789);
+  assert(array[0].raw() == 123);
+  assert(array[1].raw() == 456);
+  assert(array[2].raw() == 789);
   for (size_t i = 3; i < 200; ++i) {
-    assert(array[i].value() == 12345);
+    assert(array[i].raw() == 12345);
   }
   for (size_t i = 200; i < ARRAY_SIZE; ++i) {
-    assert(array[i].value() == 0);
+    assert(array[i].raw() == 0);
   }
 
   std::vector<grnxx::Int> values(ARRAY_SIZE);

  Modified: test/test_column.cpp (+2 -2)
===================================================================
--- test/test_column.cpp    2014-11-25 12:49:26 +0900 (e7baa14)
+++ test/test_column.cpp    2014-11-25 12:57:12 +0900 (2f38612)
@@ -212,12 +212,12 @@ void test_column() {
   int_column->set(row_id, grnxx::Int(123));
   int_column->get(row_id, &datum);
   assert(datum.type() == grnxx::INT_DATA);
-  assert(datum.as_int().value() == 123);
+  assert(datum.as_int().raw() == 123);
 
   float_column->set(row_id, grnxx::Float(1.25));
   float_column->get(row_id, &datum);
   assert(datum.type() == grnxx::FLOAT_DATA);
-  assert(datum.as_float().value() == 1.25);
+  assert(datum.as_float().raw() == 1.25);
 
   grnxx::GeoPoint geo_point(grnxx::Int(123), grnxx::Int(456));
   geo_point_column->set(row_id, geo_point);

  Modified: test/test_data_types.cpp (+191 -191)
===================================================================
--- test/test_data_types.cpp    2014-11-25 12:49:26 +0900 (0479824)
+++ test/test_data_types.cpp    2014-11-25 12:57:12 +0900 (4a5a2be)
@@ -31,9 +31,9 @@ void test_bool() {
   assert(false_object.type() == grnxx::BOOL_DATA);
   assert(na_object.type() == grnxx::BOOL_DATA);
 
-  assert(true_object.value() == grnxx::Bool::true_value());
-  assert(false_object.value() == grnxx::Bool::false_value());
-  assert(na_object.value() == grnxx::Bool::na_value());
+  assert(true_object.raw() == grnxx::Bool::raw_true());
+  assert(false_object.raw() == grnxx::Bool::raw_false());
+  assert(na_object.raw() == grnxx::Bool::raw_na());
 
   assert(true_object.is_true());
   assert(!true_object.is_false());
@@ -134,10 +134,10 @@ void test_int() {
   assert(grnxx::Int::max().type() == grnxx::INT_DATA);
   assert(grnxx::Int::na().type() == grnxx::INT_DATA);
 
-  assert(grnxx::Int(0).value() == 0);
-  assert(grnxx::Int::min().value() == grnxx::Int::min_value());
-  assert(grnxx::Int::max().value() == grnxx::Int::max_value());
-  assert(grnxx::Int::na().value() == grnxx::Int::na_value());
+  assert(grnxx::Int(0).raw() == 0);
+  assert(grnxx::Int::min().raw() == grnxx::Int::raw_min());
+  assert(grnxx::Int::max().raw() == grnxx::Int::raw_max());
+  assert(grnxx::Int::na().raw() == grnxx::Int::raw_na());
 
   assert(!grnxx::Int(0).is_min());
   assert(grnxx::Int::min().is_min());
@@ -154,33 +154,33 @@ void test_int() {
   assert(!grnxx::Int::max().is_na());
   assert(grnxx::Int::na().is_na());
 
-  assert((+grnxx::Int(0)).value() == 0);
-  assert((+grnxx::Int(1)).value() == 1);
+  assert((+grnxx::Int(0)).raw() == 0);
+  assert((+grnxx::Int(1)).raw() == 1);
   assert((+grnxx::Int::min()).is_min());
   assert((+grnxx::Int::max()).is_max());
   assert((+grnxx::Int::na()).is_na());
 
-  assert((-grnxx::Int(0)).value() == 0);
-  assert((-grnxx::Int(1)).value() == -1);
+  assert((-grnxx::Int(0)).raw() == 0);
+  assert((-grnxx::Int(1)).raw() == -1);
   assert((-grnxx::Int::min()).is_max());
   assert((-grnxx::Int::max()).is_min());
   assert((-grnxx::Int::na()).is_na());
 
-  assert((~grnxx::Int(0)).value() == -1);
-  assert((~grnxx::Int(1)).value() == -2);
-  assert((~grnxx::Int::min()).value() == (grnxx::Int::max_value() - 1));
+  assert((~grnxx::Int(0)).raw() == -1);
+  assert((~grnxx::Int(1)).raw() == -2);
+  assert((~grnxx::Int::min()).raw() == (grnxx::Int::raw_max() - 1));
   assert((~grnxx::Int::max()).is_na());
   assert((~grnxx::Int::na()).is_na());
 
   grnxx::Int object(0);
 
-  assert((++object).value() == 1);
-  assert((object++).value() == 1);
-  assert(object.value() == 2);
+  assert((++object).raw() == 1);
+  assert((object++).raw() == 1);
+  assert(object.raw() == 2);
 
-  assert((--object).value() == 1);
-  assert((object--).value() == 1);
-  assert(object.value() == 0);
+  assert((--object).raw() == 1);
+  assert((object--).raw() == 1);
+  assert(object.raw() == 0);
 
   object = grnxx::Int::na();
 
@@ -192,31 +192,31 @@ void test_int() {
   assert((object--).is_na());
   assert(object.is_na());
 
-  assert((grnxx::Int(0) & grnxx::Int(0)).value() == 0);
-  assert((grnxx::Int(0) & grnxx::Int(1)).value() == 0);
+  assert((grnxx::Int(0) & grnxx::Int(0)).raw() == 0);
+  assert((grnxx::Int(0) & grnxx::Int(1)).raw() == 0);
   assert((grnxx::Int(0) & grnxx::Int::na()).is_na());
-  assert((grnxx::Int(1) & grnxx::Int(0)).value() == 0);
-  assert((grnxx::Int(1) & grnxx::Int(1)).value() == 1);
+  assert((grnxx::Int(1) & grnxx::Int(0)).raw() == 0);
+  assert((grnxx::Int(1) & grnxx::Int(1)).raw() == 1);
   assert((grnxx::Int(1) & grnxx::Int::na()).is_na());
   assert((grnxx::Int::na() & grnxx::Int(0)).is_na());
   assert((grnxx::Int::na() & grnxx::Int(1)).is_na());
   assert((grnxx::Int::na() & grnxx::Int::na()).is_na());
 
-  assert((grnxx::Int(0) | grnxx::Int(0)).value() == 0);
-  assert((grnxx::Int(0) | grnxx::Int(1)).value() == 1);
+  assert((grnxx::Int(0) | grnxx::Int(0)).raw() == 0);
+  assert((grnxx::Int(0) | grnxx::Int(1)).raw() == 1);
   assert((grnxx::Int(0) | grnxx::Int::na()).is_na());
-  assert((grnxx::Int(1) | grnxx::Int(0)).value() == 1);
-  assert((grnxx::Int(1) | grnxx::Int(1)).value() == 1);
+  assert((grnxx::Int(1) | grnxx::Int(0)).raw() == 1);
+  assert((grnxx::Int(1) | grnxx::Int(1)).raw() == 1);
   assert((grnxx::Int(1) | grnxx::Int::na()).is_na());
   assert((grnxx::Int::na() | grnxx::Int(0)).is_na());
   assert((grnxx::Int::na() | grnxx::Int(1)).is_na());
   assert((grnxx::Int::na() | grnxx::Int::na()).is_na());
 
-  assert((grnxx::Int(0) ^ grnxx::Int(0)).value() == 0);
-  assert((grnxx::Int(0) ^ grnxx::Int(1)).value() == 1);
+  assert((grnxx::Int(0) ^ grnxx::Int(0)).raw() == 0);
+  assert((grnxx::Int(0) ^ grnxx::Int(1)).raw() == 1);
   assert((grnxx::Int(0) ^ grnxx::Int::na()).is_na());
-  assert((grnxx::Int(1) ^ grnxx::Int(0)).value() == 1);
-  assert((grnxx::Int(1) ^ grnxx::Int(1)).value() == 0);
+  assert((grnxx::Int(1) ^ grnxx::Int(0)).raw() == 1);
+  assert((grnxx::Int(1) ^ grnxx::Int(1)).raw() == 0);
   assert((grnxx::Int(1) ^ grnxx::Int::na()).is_na());
   assert((grnxx::Int::na() ^ grnxx::Int(0)).is_na());
   assert((grnxx::Int::na() ^ grnxx::Int(1)).is_na());
@@ -224,12 +224,12 @@ void test_int() {
 
   object = grnxx::Int(3);
 
-  assert((object &= grnxx::Int(1)).value() == 1);
-  assert(object.value() == 1);
-  assert((object |= grnxx::Int(2)).value() == 3);
-  assert(object.value() == 3);
-  assert((object ^= grnxx::Int(6)).value() == 5);
-  assert(object.value() == 5);
+  assert((object &= grnxx::Int(1)).raw() == 1);
+  assert(object.raw() == 1);
+  assert((object |= grnxx::Int(2)).raw() == 3);
+  assert(object.raw() == 3);
+  assert((object ^= grnxx::Int(6)).raw() == 5);
+  assert(object.raw() == 5);
 
   object = grnxx::Int(0);
 
@@ -252,8 +252,8 @@ void test_int() {
   assert((object ^= grnxx::Int(1)).is_na());
   assert(object.is_na());
 
-  assert((grnxx::Int(1) << grnxx::Int(0)).value() == 1);
-  assert((grnxx::Int(1) << grnxx::Int(1)).value() == 2);
+  assert((grnxx::Int(1) << grnxx::Int(0)).raw() == 1);
+  assert((grnxx::Int(1) << grnxx::Int(1)).raw() == 2);
   assert((grnxx::Int(1) << grnxx::Int(63)).is_na());
   assert((grnxx::Int(1) << grnxx::Int(64)).is_na());
   assert((grnxx::Int(1) << grnxx::Int(-1)).is_na());
@@ -261,9 +261,9 @@ void test_int() {
   assert((grnxx::Int::na() << grnxx::Int(1)).is_na());
   assert((grnxx::Int::na() << grnxx::Int::na()).is_na());
 
-  assert((grnxx::Int(4) >> grnxx::Int(0)).value() == 4);
-  assert((grnxx::Int(4) >> grnxx::Int(1)).value() == 2);
-  assert((grnxx::Int(4) >> grnxx::Int(63)).value() == 0);
+  assert((grnxx::Int(4) >> grnxx::Int(0)).raw() == 4);
+  assert((grnxx::Int(4) >> grnxx::Int(1)).raw() == 2);
+  assert((grnxx::Int(4) >> grnxx::Int(63)).raw() == 0);
   assert((grnxx::Int(4) >> grnxx::Int(64)).is_na());
   assert((grnxx::Int(4) >> grnxx::Int(-1)).is_na());
   assert((grnxx::Int(4) >> grnxx::Int::na()).is_na());
@@ -272,44 +272,44 @@ void test_int() {
 
   object = grnxx::Int(1);
 
-  assert((object <<= grnxx::Int(3)).value() == 8);
-  assert(object.value() == 8);
-  assert((object >>= grnxx::Int(2)).value() == 2);
-  assert(object.value() == 2);
+  assert((object <<= grnxx::Int(3)).raw() == 8);
+  assert(object.raw() == 8);
+  assert((object >>= grnxx::Int(2)).raw() == 2);
+  assert(object.raw() == 2);
 
   object = grnxx::Int(-1);
 
-  assert(object.arithmetic_right_shift(grnxx::Int(0)).value() == -1);
-  assert(object.arithmetic_right_shift(grnxx::Int(1)).value() == -1);
+  assert(object.arithmetic_right_shift(grnxx::Int(0)).raw() == -1);
+  assert(object.arithmetic_right_shift(grnxx::Int(1)).raw() == -1);
 
-  assert(object.logical_right_shift(grnxx::Int(0)).value() == -1);
+  assert(object.logical_right_shift(grnxx::Int(0)).raw() == -1);
   assert(object.logical_right_shift(grnxx::Int(1)).is_max());
 
-  assert((grnxx::Int(1) + grnxx::Int(1)).value() == 2);
+  assert((grnxx::Int(1) + grnxx::Int(1)).raw() == 2);
   assert((grnxx::Int(1) + grnxx::Int::max()).is_na());
   assert((grnxx::Int(1) + grnxx::Int::na()).is_na());
-  assert((grnxx::Int(-1) + grnxx::Int(-1)).value() == -2);
+  assert((grnxx::Int(-1) + grnxx::Int(-1)).raw() == -2);
   assert((grnxx::Int(-1) + grnxx::Int::min()).is_na());
   assert((grnxx::Int(-1) + grnxx::Int::na()).is_na());
   assert((grnxx::Int::na() + grnxx::Int(1)).is_na());
   assert((grnxx::Int::na() + grnxx::Int::na()).is_na());
 
-  assert((grnxx::Int(1) - grnxx::Int(1)).value() == 0);
+  assert((grnxx::Int(1) - grnxx::Int(1)).raw() == 0);
   assert((grnxx::Int(1) - grnxx::Int::min()).is_na());
   assert((grnxx::Int(1) - grnxx::Int::na()).is_na());
-  assert((grnxx::Int(-1) - grnxx::Int(-1)).value() == 0);
+  assert((grnxx::Int(-1) - grnxx::Int(-1)).raw() == 0);
   assert((grnxx::Int(-1) - grnxx::Int::max()).is_na());
   assert((grnxx::Int(-1) - grnxx::Int::na()).is_na());
   assert((grnxx::Int::na() - grnxx::Int(1)).is_na());
   assert((grnxx::Int::na() - grnxx::Int::na()).is_na());
 
-  assert((grnxx::Int(1) * grnxx::Int(0)).value() == 0);
-  assert((grnxx::Int(1) * grnxx::Int(2)).value() == 2);
+  assert((grnxx::Int(1) * grnxx::Int(0)).raw() == 0);
+  assert((grnxx::Int(1) * grnxx::Int(2)).raw() == 2);
   assert((grnxx::Int(1) * grnxx::Int::min()).is_min());
   assert((grnxx::Int(1) * grnxx::Int::max()).is_max());
   assert((grnxx::Int(1) * grnxx::Int::na()).is_na());
-  assert((grnxx::Int(2) * grnxx::Int(0)).value() == 0);
-  assert((grnxx::Int(2) * grnxx::Int(2)).value() == 4);
+  assert((grnxx::Int(2) * grnxx::Int(0)).raw() == 0);
+  assert((grnxx::Int(2) * grnxx::Int(2)).raw() == 4);
   assert((grnxx::Int(2) * grnxx::Int::min()).is_na());
   assert((grnxx::Int(2) * grnxx::Int::max()).is_na());
   assert((grnxx::Int(2) * grnxx::Int::na()).is_na());
@@ -319,12 +319,12 @@ void test_int() {
 
   object = grnxx::Int(1);
 
-  assert((object += grnxx::Int(2)).value() == 3);
-  assert(object.value() == 3);
-  assert((object -= grnxx::Int(1)).value() == 2);
-  assert(object.value() == 2);
-  assert((object *= grnxx::Int(4)).value() == 8);
-  assert(object.value() == 8);
+  assert((object += grnxx::Int(2)).raw() == 3);
+  assert(object.raw() == 3);
+  assert((object -= grnxx::Int(1)).raw() == 2);
+  assert(object.raw() == 2);
+  assert((object *= grnxx::Int(4)).raw() == 8);
+  assert(object.raw() == 8);
 
   object = grnxx::Int(1);
 
@@ -348,17 +348,17 @@ void test_int() {
   assert(object.is_na());
 
   assert((grnxx::Int(0) / grnxx::Int(0)).is_na());
-  assert((grnxx::Int(0) / grnxx::Int(1)).value() == 0);
-  assert((grnxx::Int(0) / grnxx::Int(2)).value() == 0);
+  assert((grnxx::Int(0) / grnxx::Int(1)).raw() == 0);
+  assert((grnxx::Int(0) / grnxx::Int(2)).raw() == 0);
   assert((grnxx::Int(0) / grnxx::Int::na()).is_na());
   assert((grnxx::Int(2) / grnxx::Int(0)).is_na());
-  assert((grnxx::Int(2) / grnxx::Int(1)).value() == 2);
-  assert((grnxx::Int(2) / grnxx::Int(2)).value() == 1);
+  assert((grnxx::Int(2) / grnxx::Int(1)).raw() == 2);
+  assert((grnxx::Int(2) / grnxx::Int(2)).raw() == 1);
   assert((grnxx::Int(2) / grnxx::Int::na()).is_na());
-  assert((grnxx::Int(3) / grnxx::Int(2)).value() == 1);
-  assert((grnxx::Int(3) / grnxx::Int(-2)).value() == -1);
-  assert((grnxx::Int(-3) / grnxx::Int(2)).value() == -1);
-  assert((grnxx::Int(-3) / grnxx::Int(-2)).value() == 1);
+  assert((grnxx::Int(3) / grnxx::Int(2)).raw() == 1);
+  assert((grnxx::Int(3) / grnxx::Int(-2)).raw() == -1);
+  assert((grnxx::Int(-3) / grnxx::Int(2)).raw() == -1);
+  assert((grnxx::Int(-3) / grnxx::Int(-2)).raw() == 1);
   assert((grnxx::Int::min() / grnxx::Int(-1)).is_max());
   assert((grnxx::Int::max() / grnxx::Int(-1)).is_min());
   assert((grnxx::Int::na() / grnxx::Int(0)).is_na());
@@ -366,26 +366,26 @@ void test_int() {
   assert((grnxx::Int::na() / grnxx::Int::na()).is_na());
 
   assert((grnxx::Int(0) % grnxx::Int(0)).is_na());
-  assert((grnxx::Int(0) % grnxx::Int(1)).value() == 0);
-  assert((grnxx::Int(0) % grnxx::Int(2)).value() == 0);
+  assert((grnxx::Int(0) % grnxx::Int(1)).raw() == 0);
+  assert((grnxx::Int(0) % grnxx::Int(2)).raw() == 0);
   assert((grnxx::Int(0) % grnxx::Int::na()).is_na());
   assert((grnxx::Int(3) % grnxx::Int(0)).is_na());
-  assert((grnxx::Int(3) % grnxx::Int(1)).value() == 0);
-  assert((grnxx::Int(3) % grnxx::Int(2)).value() == 1);
+  assert((grnxx::Int(3) % grnxx::Int(1)).raw() == 0);
+  assert((grnxx::Int(3) % grnxx::Int(2)).raw() == 1);
   assert((grnxx::Int(3) % grnxx::Int::na()).is_na());
-  assert((grnxx::Int(3) % grnxx::Int(-2)).value() == 1);
-  assert((grnxx::Int(-3) % grnxx::Int(2)).value() == -1);
-  assert((grnxx::Int(-3) % grnxx::Int(-2)).value() == -1);
+  assert((grnxx::Int(3) % grnxx::Int(-2)).raw() == 1);
+  assert((grnxx::Int(-3) % grnxx::Int(2)).raw() == -1);
+  assert((grnxx::Int(-3) % grnxx::Int(-2)).raw() == -1);
   assert((grnxx::Int::na() % grnxx::Int(0)).is_na());
   assert((grnxx::Int::na() % grnxx::Int(1)).is_na());
   assert((grnxx::Int::na() % grnxx::Int::na()).is_na());
 
   object = grnxx::Int(13);
 
-  assert((object /= grnxx::Int(2)).value() == 6);
-  assert(object.value() == 6);
-  assert((object %= grnxx::Int(3)).value() == 0);
-  assert(object.value() == 0);
+  assert((object /= grnxx::Int(2)).raw() == 6);
+  assert(object.raw() == 6);
+  assert((object %= grnxx::Int(3)).raw() == 0);
+  assert(object.raw() == 0);
 
   object = grnxx::Int(1);
 
@@ -502,16 +502,16 @@ void test_float() {
   assert(grnxx::Float::infinity().type() == grnxx::FLOAT_DATA);
   assert(grnxx::Float::na().type() == grnxx::FLOAT_DATA);
 
-  assert(grnxx::Float(0.0).value() == 0.0);
+  assert(grnxx::Float(0.0).raw() == 0.0);
   assert(grnxx::Float::min().is_min());
   assert(grnxx::Float::max().is_max());
-  assert(grnxx::Float::normal_min().value() ==
-         grnxx::Float::normal_min_value());
-  assert(grnxx::Float::subnormal_min().value() ==
-         grnxx::Float::subnormal_min_value());
-  assert(grnxx::Float::infinity().value() ==
-         grnxx::Float::infinity_value());
-  assert(std::isnan(grnxx::Float::na().value()));
+  assert(grnxx::Float::normal_min().raw() ==
+         grnxx::Float::raw_normal_min());
+  assert(grnxx::Float::subnormal_min().raw() ==
+         grnxx::Float::raw_subnormal_min());
+  assert(grnxx::Float::infinity().raw() ==
+         grnxx::Float::raw_infinity());
+  assert(std::isnan(grnxx::Float::na().raw()));
 
   assert(!grnxx::Float(0.0).is_min());
   assert(grnxx::Float::min().is_min());
@@ -543,47 +543,47 @@ void test_float() {
   assert(!grnxx::Float::infinity().is_na());
   assert(grnxx::Float::na().is_na());
 
-  assert((+grnxx::Float(0.0)).value() == 0.0);
-  assert((+grnxx::Float(1.0)).value() == 1.0);
+  assert((+grnxx::Float(0.0)).raw() == 0.0);
+  assert((+grnxx::Float(1.0)).raw() == 1.0);
   assert((+grnxx::Float::min()).is_min());
   assert((+grnxx::Float::max()).is_max());
-  assert((+grnxx::Float::infinity()).value() ==
-         grnxx::Float::infinity_value());
+  assert((+grnxx::Float::infinity()).raw() ==
+         grnxx::Float::raw_infinity());
   assert((+grnxx::Float::na()).is_na());
 
-  assert((-grnxx::Float(0.0)).value() == 0.0);
-  assert((-grnxx::Float(1.0)).value() == -1.0);
+  assert((-grnxx::Float(0.0)).raw() == 0.0);
+  assert((-grnxx::Float(1.0)).raw() == -1.0);
   assert((-grnxx::Float::min()).is_max());
   assert((-grnxx::Float::max()).is_min());
-  assert((-grnxx::Float::infinity()).value() ==
-         -grnxx::Float::infinity_value());
+  assert((-grnxx::Float::infinity()).raw() ==
+         -grnxx::Float::raw_infinity());
   assert((-grnxx::Float::na()).is_na());
 
-  assert((grnxx::Float(1.0) + grnxx::Float(1.0)).value() == 2.0);
-  assert((grnxx::Float::max() + grnxx::Float::max()).value() ==
-         grnxx::Float::infinity_value());
-  assert((grnxx::Float::infinity() + grnxx::Float::min()).value() ==
-         grnxx::Float::infinity_value());
+  assert((grnxx::Float(1.0) + grnxx::Float(1.0)).raw() == 2.0);
+  assert((grnxx::Float::max() + grnxx::Float::max()).raw() ==
+         grnxx::Float::raw_infinity());
+  assert((grnxx::Float::infinity() + grnxx::Float::min()).raw() ==
+         grnxx::Float::raw_infinity());
   assert((grnxx::Float::infinity() + -grnxx::Float::infinity()).is_na());
   assert((grnxx::Float(1.0) + grnxx::Float::na()).is_na());
   assert((grnxx::Float::na() + grnxx::Float(1.0)).is_na());
   assert((grnxx::Float::na() + grnxx::Float::na()).is_na());
 
-  assert((grnxx::Float(1.0) - grnxx::Float(1.0)).value() == 0.0);
-  assert((grnxx::Float::max() - -grnxx::Float::max()).value() ==
-         grnxx::Float::infinity_value());
-  assert((grnxx::Float::infinity() - grnxx::Float::max()).value() ==
-         grnxx::Float::infinity_value());
+  assert((grnxx::Float(1.0) - grnxx::Float(1.0)).raw() == 0.0);
+  assert((grnxx::Float::max() - -grnxx::Float::max()).raw() ==
+         grnxx::Float::raw_infinity());
+  assert((grnxx::Float::infinity() - grnxx::Float::max()).raw() ==
+         grnxx::Float::raw_infinity());
   assert((grnxx::Float::infinity() - grnxx::Float::infinity()).is_na());
   assert((grnxx::Float(1.0) - grnxx::Float::na()).is_na());
   assert((grnxx::Float::na() - grnxx::Float(1.0)).is_na());
   assert((grnxx::Float::na() - grnxx::Float::na()).is_na());
 
-  assert((grnxx::Float(2.0) * grnxx::Float(0.5)).value() == 1.0);
-  assert((grnxx::Float::max() * grnxx::Float::max()).value() ==
-         grnxx::Float::infinity_value());
-  assert((grnxx::Float::infinity() * grnxx::Float::subnormal_min()).value()
-         == grnxx::Float::infinity_value());
+  assert((grnxx::Float(2.0) * grnxx::Float(0.5)).raw() == 1.0);
+  assert((grnxx::Float::max() * grnxx::Float::max()).raw() ==
+         grnxx::Float::raw_infinity());
+  assert((grnxx::Float::infinity() * grnxx::Float::subnormal_min()).raw()
+         == grnxx::Float::raw_infinity());
   assert((grnxx::Float::infinity() * grnxx::Float(0.0)).is_na());
   assert((grnxx::Float(1.0) * grnxx::Float::na()).is_na());
   assert((grnxx::Float::na() * grnxx::Float(1.0)).is_na());
@@ -591,12 +591,12 @@ void test_float() {
 
   grnxx::Float object(1.0);
 
-  assert((object += grnxx::Float(2.0)).value() == 3.0);
-  assert(object.value() == 3.0);
-  assert((object -= grnxx::Float(1.0)).value() == 2.0);
-  assert(object.value() == 2.0);
-  assert((object *= grnxx::Float(4.0)).value() == 8.0);
-  assert(object.value() == 8.0);
+  assert((object += grnxx::Float(2.0)).raw() == 3.0);
+  assert(object.raw() == 3.0);
+  assert((object -= grnxx::Float(1.0)).raw() == 2.0);
+  assert(object.raw() == 2.0);
+  assert((object *= grnxx::Float(4.0)).raw() == 8.0);
+  assert(object.raw() == 8.0);
 
   object = grnxx::Float(1.0);
 
@@ -619,25 +619,25 @@ void test_float() {
   assert((object *= grnxx::Float(1.0)).is_na());
   assert(object.is_na());
 
-  assert((grnxx::Float(1.0) / grnxx::Float(2.0)).value() == 0.5);
-  assert((grnxx::Float(1.0) / grnxx::Float(0.0)).value() ==
-         grnxx::Float::infinity_value());
-  assert((grnxx::Float(1.0) / grnxx::Float::infinity()).value() == 0.0);
-  assert((grnxx::Float::max() / grnxx::Float::subnormal_min()).value() ==
-         grnxx::Float::infinity_value());
-  assert((grnxx::Float::infinity() / grnxx::Float::max()).value() ==
-         grnxx::Float::infinity_value());
+  assert((grnxx::Float(1.0) / grnxx::Float(2.0)).raw() == 0.5);
+  assert((grnxx::Float(1.0) / grnxx::Float(0.0)).raw() ==
+         grnxx::Float::raw_infinity());
+  assert((grnxx::Float(1.0) / grnxx::Float::infinity()).raw() == 0.0);
+  assert((grnxx::Float::max() / grnxx::Float::subnormal_min()).raw() ==
+         grnxx::Float::raw_infinity());
+  assert((grnxx::Float::infinity() / grnxx::Float::max()).raw() ==
+         grnxx::Float::raw_infinity());
   assert((grnxx::Float::infinity() / grnxx::Float::infinity()).is_na());
   assert((grnxx::Float(0.0) / grnxx::Float(0.0)).is_na());
   assert((grnxx::Float(1.0) / grnxx::Float::na()).is_na());
   assert((grnxx::Float::na() / grnxx::Float(1.0)).is_na());
   assert((grnxx::Float::na() / grnxx::Float::na()).is_na());
 
-  assert((grnxx::Float(1.0) % grnxx::Float(2.0)).value() == 1.0);
-  assert((grnxx::Float(1.0) % grnxx::Float(-2.0)).value() == 1.0);
-  assert((grnxx::Float(-1.0) % grnxx::Float(2.0)).value() == -1.0);
-  assert((grnxx::Float(-1.0) % grnxx::Float(-2.0)).value() == -1.0);
-  assert((grnxx::Float(1.0) % grnxx::Float::infinity()).value() == 1.0);
+  assert((grnxx::Float(1.0) % grnxx::Float(2.0)).raw() == 1.0);
+  assert((grnxx::Float(1.0) % grnxx::Float(-2.0)).raw() == 1.0);
+  assert((grnxx::Float(-1.0) % grnxx::Float(2.0)).raw() == -1.0);
+  assert((grnxx::Float(-1.0) % grnxx::Float(-2.0)).raw() == -1.0);
+  assert((grnxx::Float(1.0) % grnxx::Float::infinity()).raw() == 1.0);
   assert((grnxx::Float::infinity() % grnxx::Float(1.0)).is_na());
   assert((grnxx::Float::infinity() % grnxx::Float::infinity()).is_na());
   assert((grnxx::Float(0.0) % grnxx::Float(0.0)).is_na());
@@ -647,10 +647,10 @@ void test_float() {
 
   object = grnxx::Float(13.0);
 
-  assert((object /= grnxx::Float(2.0)).value() == 6.5);
-  assert(object.value() == 6.5);
-  assert((object %= grnxx::Float(3.0)).value() == 0.5);
-  assert(object.value() == 0.5);
+  assert((object /= grnxx::Float(2.0)).raw() == 6.5);
+  assert(object.raw() == 6.5);
+  assert((object %= grnxx::Float(3.0)).raw() == 0.5);
+  assert(object.raw() == 0.5);
 
   object = grnxx::Float(1.0);
 
@@ -802,18 +802,18 @@ void test_float() {
   assert(grnxx::Float::na().unmatch(grnxx::Float::infinity()));
   assert(!grnxx::Float::na().unmatch(grnxx::Float::na()));
 
-  assert((grnxx::Float(0.0).next_toward(grnxx::Float::max())).value() ==
-         grnxx::Float::subnormal_min_value());
-  assert((grnxx::Float(0.0).next_toward(-grnxx::Float::max())).value() ==
-         -grnxx::Float::subnormal_min_value());
-  assert((grnxx::Float(0.0).next_toward(grnxx::Float::infinity())).value() ==
-         grnxx::Float::subnormal_min_value());
-  assert((grnxx::Float(0.0).next_toward(-grnxx::Float::infinity())).value() ==
-         -grnxx::Float::subnormal_min_value());
-  assert((grnxx::Float::infinity().next_toward(grnxx::Float(0.0))).value()
-         == grnxx::Float::max_value());
-  assert((-grnxx::Float::infinity().next_toward(grnxx::Float(0.0))).value()
-         == grnxx::Float::min_value());
+  assert((grnxx::Float(0.0).next_toward(grnxx::Float::max())).raw() ==
+         grnxx::Float::raw_subnormal_min());
+  assert((grnxx::Float(0.0).next_toward(-grnxx::Float::max())).raw() ==
+         -grnxx::Float::raw_subnormal_min());
+  assert((grnxx::Float(0.0).next_toward(grnxx::Float::infinity())).raw() ==
+         grnxx::Float::raw_subnormal_min());
+  assert((grnxx::Float(0.0).next_toward(-grnxx::Float::infinity())).raw() ==
+         -grnxx::Float::raw_subnormal_min());
+  assert((grnxx::Float::infinity().next_toward(grnxx::Float(0.0))).raw()
+         == grnxx::Float::raw_max());
+  assert((-grnxx::Float::infinity().next_toward(grnxx::Float(0.0))).raw()
+         == grnxx::Float::raw_min());
   assert((grnxx::Float(0.0).next_toward(grnxx::Float::na())).is_na());
   assert((grnxx::Float::na().next_toward(grnxx::Float(0.0))).is_na());
   assert((grnxx::Float::na().next_toward(grnxx::Float::na())).is_na());
@@ -841,25 +841,25 @@ void test_geo_point() {
   assert(south_pole.longitude() == 0);
   assert(na.longitude() == grnxx::GeoPoint::na_longitude());
 
-  assert(zero.latitude_in_milliseconds().value() == 0);
-  assert(date_line.latitude_in_milliseconds().value() == 0);
+  assert(zero.latitude_in_milliseconds().raw() == 0);
+  assert(date_line.latitude_in_milliseconds().raw() == 0);
   assert(na.latitude_in_milliseconds().is_na());
 
-  assert(zero.longitude_in_milliseconds().value() == 0);
-  assert(north_pole.longitude_in_milliseconds().value() == 0);
-  assert(south_pole.longitude_in_milliseconds().value() == 0);
+  assert(zero.longitude_in_milliseconds().raw() == 0);
+  assert(north_pole.longitude_in_milliseconds().raw() == 0);
+  assert(south_pole.longitude_in_milliseconds().raw() == 0);
   assert(na.longitude_in_milliseconds().is_na());
 
-  assert(zero.latitude_in_degrees().value() == 0.0);
-  assert(north_pole.latitude_in_degrees().value() == 90.0);
-  assert(south_pole.latitude_in_degrees().value() == -90.0);
-  assert(date_line.latitude_in_degrees().value() == 0.0);
+  assert(zero.latitude_in_degrees().raw() == 0.0);
+  assert(north_pole.latitude_in_degrees().raw() == 90.0);
+  assert(south_pole.latitude_in_degrees().raw() == -90.0);
+  assert(date_line.latitude_in_degrees().raw() == 0.0);
   assert(na.latitude_in_degrees().is_na());
 
-  assert(zero.longitude_in_degrees().value() == 0.0);
-  assert(north_pole.longitude_in_degrees().value() == 0.0);
-  assert(south_pole.longitude_in_degrees().value() == 0.0);
-  assert(date_line.longitude_in_degrees().value() == -180.0);
+  assert(zero.longitude_in_degrees().raw() == 0.0);
+  assert(north_pole.longitude_in_degrees().raw() == 0.0);
+  assert(south_pole.longitude_in_degrees().raw() == 0.0);
+  assert(date_line.longitude_in_degrees().raw() == -180.0);
   assert(na.longitude_in_degrees().is_na());
 
   assert((zero == zero).is_true());
@@ -944,10 +944,10 @@ void test_text() {
   assert(std::strcmp(abc.data(), "abc") == 0);
   assert(std::strcmp(bc.data(), "bc") == 0);
 
-  assert(ab.size().value() == 2);
-  assert(abc.size().value() == 3);
-  assert(bc.size().value() == 2);
-  assert(empty.size().value() == 0);
+  assert(ab.size().raw() == 2);
+  assert(abc.size().raw() == 3);
+  assert(bc.size().raw() == 2);
+  assert(empty.size().raw() == 0);
   assert(na.size().is_na());
 
   assert(!ab.is_empty());
@@ -1169,9 +1169,9 @@ void test_bool_vector() {
   assert(ftn[1].is_true());
   assert(ftn[2].is_na());
 
-  assert(tft.size().value() == 3);
-  assert(ftn.size().value() == 3);
-  assert(empty.size().value() == 0);
+  assert(tft.size().raw() == 3);
+  assert(ftn.size().raw() == 3);
+  assert(empty.size().raw() == 0);
   assert(na.size().is_na());
 
   assert(!tft.is_empty());
@@ -1247,17 +1247,17 @@ void test_int_vector() {
   assert(empty.type() == grnxx::INT_VECTOR_DATA);
   assert(na.type() == grnxx::INT_VECTOR_DATA);
 
-  assert(abc[0].value() == 1);
-  assert(abc[1].value() == 2);
-  assert(abc[2].value() == 3);
+  assert(abc[0].raw() == 1);
+  assert(abc[1].raw() == 2);
+  assert(abc[2].raw() == 3);
 
-  assert(bcn[0].value() == 2);
-  assert(bcn[1].value() == 3);
+  assert(bcn[0].raw() == 2);
+  assert(bcn[1].raw() == 3);
   assert(bcn[2].is_na());
 
-  assert(abc.size().value() == 3);
-  assert(bcn.size().value() == 3);
-  assert(empty.size().value() == 0);
+  assert(abc.size().raw() == 3);
+  assert(bcn.size().raw() == 3);
+  assert(empty.size().raw() == 0);
   assert(na.size().is_na());
 
   assert(!abc.is_empty());
@@ -1333,17 +1333,17 @@ void test_float_vector() {
   assert(empty.type() == grnxx::FLOAT_VECTOR_DATA);
   assert(na.type() == grnxx::FLOAT_VECTOR_DATA);
 
-  assert(abc[0].value() == 1.25);
-  assert(abc[1].value() == 2.50);
-  assert(abc[2].value() == 6.25);
+  assert(abc[0].raw() == 1.25);
+  assert(abc[1].raw() == 2.50);
+  assert(abc[2].raw() == 6.25);
 
-  assert(bcn[0].value() == 2.50);
-  assert(bcn[1].value() == 6.25);
+  assert(bcn[0].raw() == 2.50);
+  assert(bcn[1].raw() == 6.25);
   assert(bcn[2].is_na());
 
-  assert(abc.size().value() == 3);
-  assert(bcn.size().value() == 3);
-  assert(empty.size().value() == 0);
+  assert(abc.size().raw() == 3);
+  assert(bcn.size().raw() == 3);
+  assert(empty.size().raw() == 0);
   assert(na.size().is_na());
 
   assert(!abc.is_empty());
@@ -1435,9 +1435,9 @@ void test_geo_point_vector() {
   assert(ton[1].longitude() == data[2].longitude());
   assert(ton[2].longitude() == data[3].longitude());
 
-  assert(sto.size().value() == 3);
-  assert(ton.size().value() == 3);
-  assert(empty.size().value() == 0);
+  assert(sto.size().raw() == 3);
+  assert(ton.size().raw() == 3);
+  assert(empty.size().raw() == 0);
   assert(na.size().is_na());
 
   assert(!sto.is_empty());
@@ -1521,9 +1521,9 @@ void test_text_vector() {
   assert(bcn[1].data() == data[2].data());
   assert(bcn[2].is_na());
 
-  assert(abc.size().value() == 3);
-  assert(bcn.size().value() == 3);
-  assert(empty.size().value() == 0);
+  assert(abc.size().raw() == 3);
+  assert(bcn.size().raw() == 3);
+  assert(empty.size().raw() == 0);
   assert(na.size().is_na());
 
   assert(!abc.is_empty());

  Modified: test/test_expression.cpp (+105 -105)
===================================================================
--- test/test_expression.cpp    2014-11-25 12:49:26 +0900 (0719fc2)
+++ test/test_expression.cpp    2014-11-25 12:57:12 +0900 (fdbdbdd)
@@ -439,7 +439,7 @@ void test_constant() try {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    assert(int_results[i].value() == 100);
+    assert(int_results[i].raw() == 100);
   }
 
   // Test an expression (1.25).
@@ -450,13 +450,13 @@ void test_constant() try {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    assert(float_results[i].value() == 1.25);
+    assert(float_results[i].raw() == 1.25);
   }
 
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    assert(records[i].score.value() == 1.25);
+    assert(records[i].score.raw() == 1.25);
   }
 
   // Test an expression ({ 123, 456 }).
@@ -611,7 +611,7 @@ void test_score() try {
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    assert(records[i].score.value() == 0.0);
+    assert(records[i].score.raw() == 0.0);
   }
 } catch (const char *msg) {
   std::cout << msg << std::endl;
@@ -632,7 +632,7 @@ void test_column() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_results[i].match(test.bool_values[row_id]));
   }
 
@@ -656,7 +656,7 @@ void test_column() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id]));
   }
 
@@ -668,14 +668,14 @@ void test_column() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(test.float_values[row_id]));
   }
 
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.float_values[row_id]));
   }
 
@@ -687,7 +687,7 @@ void test_column() {
   expression->evaluate(records, &geo_point_results);
   assert(geo_point_results.size() == test.table->num_rows());
   for (size_t i = 0; i < geo_point_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(geo_point_results[i].match(test.geo_point_values[row_id]));
   }
 
@@ -701,7 +701,7 @@ void test_column() {
   expression->evaluate(records, &text_results);
   assert(text_results.size() == test.table->num_rows());
   for (size_t i = 0; i < text_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(text_results[i].match(test.text_values[row_id]));
   }
 
@@ -715,7 +715,7 @@ void test_column() {
   expression->evaluate(records, &bool_vector_results);
   assert(bool_vector_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_vector_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_vector_results[i].match(test.bool_vector_values[row_id]));
   }
 
@@ -729,7 +729,7 @@ void test_column() {
   expression->evaluate(records, &int_vector_results);
   assert(int_vector_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_vector_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_vector_results[i].match(test.int_vector_values[row_id]));
   }
 
@@ -743,7 +743,7 @@ void test_column() {
   expression->evaluate(records, &float_vector_results);
   assert(float_vector_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_vector_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_vector_results[i].match(test.float_vector_values[row_id]));
   }
 
@@ -757,7 +757,7 @@ void test_column() {
   expression->evaluate(records, &geo_point_vector_results);
   assert(geo_point_vector_results.size() == test.table->num_rows());
   for (size_t i = 0; i < geo_point_vector_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(geo_point_vector_results[i].match(
            test.geo_point_vector_values[row_id]));
   }
@@ -772,7 +772,7 @@ void test_column() {
   expression->evaluate(records, &text_vector_results);
   assert(text_vector_results.size() == test.table->num_rows());
   for (size_t i = 0; i < text_vector_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(text_vector_results[i].match(test.text_vector_values[row_id]));
   }
 
@@ -786,7 +786,7 @@ void test_column() {
   expression->evaluate(records, &ref_results);
   assert(ref_results.size() == test.table->num_rows());
   for (size_t i = 0; i < ref_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(ref_results[i].match(test.ref_values[row_id]));
   }
 
@@ -800,7 +800,7 @@ void test_column() {
   expression->evaluate(records, &ref_vector_results);
   assert(ref_vector_results.size() == test.table->num_rows());
   for (size_t i = 0; i < ref_vector_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(ref_vector_results[i].match(test.ref_vector_values[row_id]));
   }
 }
@@ -820,7 +820,7 @@ void test_logical_not() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_results[i].match(!test.bool_values[row_id]));
   }
 
@@ -850,7 +850,7 @@ void test_bitwise_not() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_results[i].match(~test.bool_values[row_id]));
   }
 
@@ -875,7 +875,7 @@ void test_bitwise_not() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(~test.int_values[row_id]));
   }
 }
@@ -895,7 +895,7 @@ void test_positive() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id]));
   }
 
@@ -910,14 +910,14 @@ void test_positive() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(test.float_values[row_id]));
   }
 
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.float_values[row_id]));
   }
 }
@@ -937,7 +937,7 @@ void test_negative() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(-test.int_values[row_id]));
   }
 
@@ -952,14 +952,14 @@ void test_negative() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(-test.float_values[row_id]));
   }
 
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(-test.float_values[row_id]));
   }
 }
@@ -979,7 +979,7 @@ void test_to_int() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.float_values[row_id].to_int()));
   }
 }
@@ -1000,14 +1000,14 @@ void test_to_float() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(test.int_values[row_id].to_float()));
   }
 
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.int_values[row_id].to_float()));
   }
 }
@@ -1028,7 +1028,7 @@ void test_logical_and() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_results[i].match(test.bool_values[row_id] &
                                  test.bool2_values[row_id]));
   }
@@ -1060,7 +1060,7 @@ void test_logical_or() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_results[i].match(test.bool_values[row_id] |
                                  test.bool2_values[row_id]));
   }
@@ -1092,7 +1092,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.bool_values[row_id] ==
                             test.bool2_values[row_id]));
   }
@@ -1119,7 +1119,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.int_values[row_id] ==
                             test.int2_values[row_id]));
   }
@@ -1146,7 +1146,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.float_values[row_id] ==
                             test.float2_values[row_id]));
   }
@@ -1173,7 +1173,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.geo_point_values[row_id] ==
                             test.geo_point2_values[row_id]));
   }
@@ -1200,7 +1200,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.text_values[row_id] ==
                             test.text2_values[row_id]));
   }
@@ -1227,7 +1227,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.bool_vector_values[row_id] ==
                             test.bool_vector2_values[row_id]));
   }
@@ -1255,7 +1255,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.int_vector_values[row_id] ==
                             test.int_vector2_values[row_id]));
   }
@@ -1282,7 +1282,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.float_vector_values[row_id] ==
                             test.float_vector2_values[row_id]));
   }
@@ -1310,7 +1310,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.geo_point_vector_values[row_id] ==
                             test.geo_point_vector2_values[row_id]));
   }
@@ -1338,7 +1338,7 @@ void test_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.text_vector_values[row_id] ==
                             test.text_vector2_values[row_id]));
   }
@@ -1371,7 +1371,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.bool_values[row_id] !=
                             test.bool2_values[row_id]));
   }
@@ -1398,7 +1398,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.int_values[row_id] !=
                             test.int2_values[row_id]));
   }
@@ -1425,7 +1425,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.float_values[row_id] !=
                             test.float2_values[row_id]));
   }
@@ -1452,7 +1452,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.geo_point_values[row_id] !=
                             test.geo_point2_values[row_id]));
   }
@@ -1479,7 +1479,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.text_values[row_id] !=
                             test.text2_values[row_id]));
   }
@@ -1506,7 +1506,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.bool_vector_values[row_id] !=
                             test.bool_vector2_values[row_id]));
   }
@@ -1534,7 +1534,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.int_vector_values[row_id] !=
                             test.int_vector2_values[row_id]));
   }
@@ -1561,7 +1561,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.float_vector_values[row_id] !=
                             test.float_vector2_values[row_id]));
   }
@@ -1589,7 +1589,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.geo_point_vector_values[row_id] !=
                             test.geo_point_vector2_values[row_id]));
   }
@@ -1617,7 +1617,7 @@ void test_not_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.text_vector_values[row_id] !=
                             test.text_vector2_values[row_id]));
   }
@@ -1650,7 +1650,7 @@ void test_less() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.int_values[row_id] <
                             test.int2_values[row_id]));
   }
@@ -1677,7 +1677,7 @@ void test_less() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.float_values[row_id] <
                             test.float2_values[row_id]));
   }
@@ -1704,7 +1704,7 @@ void test_less() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.text_values[row_id] <
                             test.text2_values[row_id]));
   }
@@ -1736,7 +1736,7 @@ void test_less_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.int_values[row_id] <=
                             test.int2_values[row_id]));
   }
@@ -1763,7 +1763,7 @@ void test_less_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.float_values[row_id] <=
                             test.float2_values[row_id]));
   }
@@ -1790,7 +1790,7 @@ void test_less_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.text_values[row_id] <=
                             test.text2_values[row_id]));
   }
@@ -1822,7 +1822,7 @@ void test_greater() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.int_values[row_id] >
                             test.int2_values[row_id]));
   }
@@ -1849,7 +1849,7 @@ void test_greater() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.float_values[row_id] >
                             test.float2_values[row_id]));
   }
@@ -1876,7 +1876,7 @@ void test_greater() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.text_values[row_id] >
                             test.text2_values[row_id]));
   }
@@ -1908,7 +1908,7 @@ void test_greater_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.int_values[row_id] >=
                             test.int2_values[row_id]));
   }
@@ -1935,7 +1935,7 @@ void test_greater_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.float_values[row_id] >=
                             test.float2_values[row_id]));
   }
@@ -1962,7 +1962,7 @@ void test_greater_equal() {
   expression->evaluate(records, &results);
   assert(results.size() == test.table->num_rows());
   for (size_t i = 0; i < results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(test.text_values[row_id] >=
                             test.text2_values[row_id]));
   }
@@ -1994,7 +1994,7 @@ void test_bitwise_and() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_results[i].match(test.bool_values[row_id] &
                                  test.bool2_values[row_id]));
   }
@@ -2021,7 +2021,7 @@ void test_bitwise_and() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id] &
                                 test.int2_values[row_id]));
   }
@@ -2043,7 +2043,7 @@ void test_bitwise_or() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_results[i].match(test.bool_values[row_id] |
                                  test.bool2_values[row_id]));
   }
@@ -2070,7 +2070,7 @@ void test_bitwise_or() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id] |
                                 test.int2_values[row_id]));
   }
@@ -2092,7 +2092,7 @@ void test_bitwise_xor() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(bool_results[i].match(test.bool_values[row_id] ^
                                  test.bool2_values[row_id]));
   }
@@ -2119,7 +2119,7 @@ void test_bitwise_xor() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id] ^
                                 test.int2_values[row_id]));
   }
@@ -2141,7 +2141,7 @@ void test_plus() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id] +
                                 test.int2_values[row_id]));
   }
@@ -2158,7 +2158,7 @@ void test_plus() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(test.float_values[row_id] +
                                   test.float2_values[row_id]));
   }
@@ -2166,7 +2166,7 @@ void test_plus() {
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.float_values[row_id] +
                                   test.float2_values[row_id]));
   }
@@ -2188,7 +2188,7 @@ void test_minus() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id] -
                                 test.int2_values[row_id]));
   }
@@ -2205,7 +2205,7 @@ void test_minus() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(test.float_values[row_id] -
                                   test.float2_values[row_id]));
   }
@@ -2213,7 +2213,7 @@ void test_minus() {
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.float_values[row_id] -
                                   test.float2_values[row_id]));
   }
@@ -2236,7 +2236,7 @@ void test_multiplication() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id] *
                                 test.int2_values[row_id]));
   }
@@ -2253,7 +2253,7 @@ void test_multiplication() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(test.float_values[row_id] *
                                   test.float2_values[row_id]));
   }
@@ -2261,7 +2261,7 @@ void test_multiplication() {
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.float_values[row_id] *
                                   test.float2_values[row_id]));
   }
@@ -2284,7 +2284,7 @@ void test_division() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id] /
                                 test.int2_values[row_id]));
   }
@@ -2301,7 +2301,7 @@ void test_division() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(test.float_values[row_id] /
                                   test.float2_values[row_id]));
   }
@@ -2309,7 +2309,7 @@ void test_division() {
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.float_values[row_id] /
                                   test.float2_values[row_id]));
   }
@@ -2332,7 +2332,7 @@ void test_modulus() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(int_results[i].match(test.int_values[row_id] %
                                 test.int2_values[row_id]));
   }
@@ -2349,7 +2349,7 @@ void test_modulus() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(float_results[i].match(test.float_values[row_id] %
                                   test.float2_values[row_id]));
   }
@@ -2357,7 +2357,7 @@ void test_modulus() {
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.float_values[row_id] %
                                   test.float2_values[row_id]));
   }
@@ -2379,7 +2379,7 @@ void test_subscript() {
   expression->evaluate(records, &bool_results);
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     const auto int_value = test.int_values[row_id];
     const auto &bool_vector_value = test.bool_vector_values[row_id];
     assert(bool_results[i].match(bool_vector_value[int_value]));
@@ -2409,7 +2409,7 @@ void test_subscript() {
   expression->evaluate(records, &int_results);
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     const auto int_value = test.int_values[row_id];
     const auto &int_vector_value = test.int_vector_values[row_id];
     assert(int_results[i].match(int_vector_value[int_value]));
@@ -2427,7 +2427,7 @@ void test_subscript() {
   expression->evaluate(records, &float_results);
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     const auto int_value = test.int_values[row_id];
     const auto &float_vector_value = test.float_vector_values[row_id];
     assert(float_results[i].match(float_vector_value[int_value]));
@@ -2436,7 +2436,7 @@ void test_subscript() {
   expression->adjust(&records);
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     const auto int_value = test.int_values[row_id];
     const auto &float_vector_value = test.float_vector_values[row_id];
     assert(records[i].score.match(float_vector_value[int_value]));
@@ -2454,7 +2454,7 @@ void test_subscript() {
   expression->evaluate(records, &geo_point_results);
   assert(geo_point_results.size() == test.table->num_rows());
   for (size_t i = 0; i < geo_point_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     const auto int_value = test.int_values[row_id];
     const auto &geo_point_vector_value = test.geo_point_vector_values[row_id];
     assert(geo_point_results[i].match(geo_point_vector_value[int_value]));
@@ -2472,7 +2472,7 @@ void test_subscript() {
   expression->evaluate(records, &text_results);
   assert(text_results.size() == test.table->num_rows());
   for (size_t i = 0; i < text_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     const auto int_value = test.int_values[row_id];
     const auto &text_vector_value = test.text_vector_values[row_id];
     assert(text_results[i].match(text_vector_value[int_value]));
@@ -2497,7 +2497,7 @@ void test_subexpression() {
   assert(bool_results.size() == test.table->num_rows());
   for (size_t i = 0; i < bool_results.size(); ++i) {
     const auto ref_value = test.ref_values[i];
-    const auto bool_value = test.bool_values[ref_value.value()];
+    const auto bool_value = test.bool_values[ref_value.raw()];
     assert(bool_results[i].match(bool_value));
   }
 
@@ -2505,7 +2505,7 @@ void test_subexpression() {
   size_t count = 0;
   for (size_t i = 0; i < test.ref_values.size(); ++i) {
     const auto ref_value = test.ref_values[i];
-    const auto bool_value = test.bool_values[ref_value.value()];
+    const auto bool_value = test.bool_values[ref_value.raw()];
     if (bool_value.is_true()) {
       assert(records[count].row_id.match(grnxx::Int(i)));
       ++count;
@@ -2527,14 +2527,14 @@ void test_subexpression() {
   assert(float_results.size() == test.table->num_rows());
   for (size_t i = 0; i < float_results.size(); ++i) {
     const auto ref_value = test.ref_values[i];
-    const auto float_value = test.float_values[ref_value.value()];
+    const auto float_value = test.float_values[ref_value.raw()];
     assert(float_results[i].match(float_value));
   }
 
   expression->adjust(&records);
   for (size_t i = 0; i < float_results.size(); ++i) {
     const auto ref_value = test.ref_values[i];
-    const auto float_value = test.float_values[ref_value.value()];
+    const auto float_value = test.float_values[ref_value.raw()];
     assert(records[i].score.match(float_value));
   }
 
@@ -2552,7 +2552,7 @@ void test_subexpression() {
   assert(int_vector_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_vector_results.size(); ++i) {
     const auto ref_value = test.ref_values[i];
-    const auto int_vector_value = test.int_vector_values[ref_value.value()];
+    const auto int_vector_value = test.int_vector_values[ref_value.raw()];
     assert(int_vector_results[i].match(int_vector_value));
   }
 
@@ -2572,10 +2572,10 @@ void test_subexpression() {
   expression->evaluate(records, &text_results);
   assert(text_results.size() == test.table->num_rows());
   for (size_t i = 0; i < text_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     const auto ref_value = test.ref_values[row_id];
-    const auto ref_ref_value = test.ref_values[ref_value.value()];
-    const auto text_value = test.text_values[ref_ref_value.value()];
+    const auto ref_ref_value = test.ref_values[ref_value.raw()];
+    const auto text_value = test.text_values[ref_ref_value.raw()];
     assert(text_results[i].match(text_value));
   }
 
@@ -2596,8 +2596,8 @@ void test_subexpression() {
   assert(int_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_results.size(); ++i) {
     const auto ref_value = test.ref_values[i];
-    const auto ref_ref_value = test.ref_values[ref_value.value()];
-    const auto int_value = test.int_values[ref_ref_value.value()];
+    const auto ref_ref_value = test.ref_values[ref_value.raw()];
+    const auto int_value = test.int_values[ref_ref_value.raw()];
     assert(int_results[i].match(int_value));
   }
 
@@ -2614,13 +2614,13 @@ void test_subexpression() {
   expression->evaluate(records, &int_vector_results);
   assert(int_vector_results.size() == test.table->num_rows());
   for (size_t i = 0; i < int_vector_results.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     const auto ref_vector_value = test.ref_vector_values[row_id];
     assert(int_vector_results[i].size().match(ref_vector_value.size()));
-    size_t value_size = ref_vector_value.size().value();
+    size_t value_size = ref_vector_value.size().raw();
     for (size_t j = 0; j < value_size; ++j) {
       grnxx::Int ref_value = ref_vector_value[j];
-      const auto int_value = test.int_values[ref_value.value()];
+      const auto int_value = test.int_values[ref_value.raw()];
       assert(int_vector_results[i][j].match(int_value));
     }
   }
@@ -2692,7 +2692,7 @@ void test_sequential_adjust() {
 
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(records[i].score.match(test.int_values[row_id].to_float() +
                                   test.float_values[row_id]));
   }
@@ -2730,7 +2730,7 @@ void test_sequential_evaluate() {
 
   assert(records.size() == test.table->num_rows());
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(results[i].match(
            (test.int_values[row_id] +
             (test.float_values[row_id] * grnxx::Float(100.0)).to_int())));

  Modified: test/test_issue_62.cpp (+3 -3)
===================================================================
--- test/test_issue_62.cpp    2014-11-25 12:49:26 +0900 (b4a7f80)
+++ test/test_issue_62.cpp    2014-11-25 12:57:12 +0900 (ebeb18b)
@@ -56,7 +56,7 @@ void test_scored_subexpression() {
   // Store generated values into columns.
   for (size_t i = 0; i < NUM_ROWS; ++i) {
     grnxx::Int row_id = table->insert_row();
-    assert(row_id.value() == grnxx::Int(i).value());
+    assert(row_id.match(grnxx::Int(i)));
     float_column->set(row_id, float_values[i]);
   }
   for (size_t i = 0; i < NUM_ROWS; ++i) {
@@ -86,8 +86,8 @@ void test_scored_subexpression() {
   expression->filter(&records);
   size_t count = 0;
   for (size_t i = 0; i < NUM_ROWS; ++i) {
-    if (float_values[i].value() > 0.5) {
-      assert(records[count].row_id.value() == grnxx::Int(i).value());
+    if (float_values[i].raw() > 0.5) {
+      assert(records[count].row_id.match(grnxx::Int(i)));
       ++count;
     }
   }

  Modified: test/test_merger.cpp (+42 -42)
===================================================================
--- test/test_merger.cpp    2014-11-25 12:49:26 +0900 (5400f95)
+++ test/test_merger.cpp    2014-11-25 12:57:12 +0900 (15298dc)
@@ -184,7 +184,7 @@ void test_and() {
   options.score_operator_type = grnxx::MERGER_SCORE_PLUS;
   auto output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] + test.scores2[row_id]));
@@ -202,7 +202,7 @@ void test_and() {
   options.score_operator_type = grnxx::MERGER_SCORE_MINUS;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] - test.scores2[row_id]));
@@ -212,7 +212,7 @@ void test_and() {
   options.score_operator_type = grnxx::MERGER_SCORE_MULTIPLICATION;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] * test.scores2[row_id]));
@@ -222,7 +222,7 @@ void test_and() {
   options.score_operator_type = grnxx::MERGER_SCORE_LEFT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id]));
@@ -232,7 +232,7 @@ void test_and() {
   options.score_operator_type = grnxx::MERGER_SCORE_RIGHT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores2[row_id]));
@@ -242,10 +242,10 @@ void test_and() {
   options.score_operator_type = grnxx::MERGER_SCORE_ZERO;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            test.bool2_values[row_id].is_true());
-    assert(output[i].score.value() == 0.0);
+    assert(output[i].score.raw() == 0.0);
   }
 }
 
@@ -263,7 +263,7 @@ void test_or() {
   options.score_operator_type = grnxx::MERGER_SCORE_PLUS;
   auto output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() |
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] + test.scores2[row_id]));
@@ -281,7 +281,7 @@ void test_or() {
   options.score_operator_type = grnxx::MERGER_SCORE_MINUS;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() |
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] - test.scores2[row_id]));
@@ -291,7 +291,7 @@ void test_or() {
   options.score_operator_type = grnxx::MERGER_SCORE_MULTIPLICATION;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() |
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] * test.scores2[row_id]));
@@ -301,7 +301,7 @@ void test_or() {
   options.score_operator_type = grnxx::MERGER_SCORE_LEFT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() |
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id]));
@@ -311,7 +311,7 @@ void test_or() {
   options.score_operator_type = grnxx::MERGER_SCORE_RIGHT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() |
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores2[row_id]));
@@ -321,10 +321,10 @@ void test_or() {
   options.score_operator_type = grnxx::MERGER_SCORE_ZERO;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() |
            test.bool2_values[row_id].is_true());
-    assert(output[i].score.value() == 0.0);
+    assert(output[i].score.raw() == 0.0);
   }
 }
 
@@ -342,7 +342,7 @@ void test_xor() {
   options.score_operator_type = grnxx::MERGER_SCORE_PLUS;
   auto output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() ^
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] + test.scores2[row_id]));
@@ -359,7 +359,7 @@ void test_xor() {
   options.score_operator_type = grnxx::MERGER_SCORE_MINUS;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() ^
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] - test.scores2[row_id]));
@@ -369,7 +369,7 @@ void test_xor() {
   options.score_operator_type = grnxx::MERGER_SCORE_MULTIPLICATION;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() ^
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] * test.scores2[row_id]));
@@ -379,7 +379,7 @@ void test_xor() {
   options.score_operator_type = grnxx::MERGER_SCORE_LEFT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() ^
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id]));
@@ -389,7 +389,7 @@ void test_xor() {
   options.score_operator_type = grnxx::MERGER_SCORE_RIGHT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() ^
            test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores2[row_id]));
@@ -399,10 +399,10 @@ void test_xor() {
   options.score_operator_type = grnxx::MERGER_SCORE_ZERO;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() ^
            test.bool2_values[row_id].is_true());
-    assert(output[i].score.value() == 0.0);
+    assert(output[i].score.raw() == 0.0);
   }
 }
 
@@ -420,7 +420,7 @@ void test_minus() {
   options.score_operator_type = grnxx::MERGER_SCORE_PLUS;
   auto output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            !test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] + test.scores2[row_id]));
@@ -437,7 +437,7 @@ void test_minus() {
   options.score_operator_type = grnxx::MERGER_SCORE_MINUS;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            !test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] - test.scores2[row_id]));
@@ -447,7 +447,7 @@ void test_minus() {
   options.score_operator_type = grnxx::MERGER_SCORE_MULTIPLICATION;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            !test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] * test.scores2[row_id]));
@@ -457,7 +457,7 @@ void test_minus() {
   options.score_operator_type = grnxx::MERGER_SCORE_LEFT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            !test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id]));
@@ -467,7 +467,7 @@ void test_minus() {
   options.score_operator_type = grnxx::MERGER_SCORE_RIGHT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            !test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores2[row_id]));
@@ -477,10 +477,10 @@ void test_minus() {
   options.score_operator_type = grnxx::MERGER_SCORE_ZERO;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &
            !test.bool2_values[row_id].is_true());
-    assert(output[i].score.value() == 0.0);
+    assert(output[i].score.raw() == 0.0);
   }
 }
 
@@ -498,7 +498,7 @@ void test_left() {
   options.score_operator_type = grnxx::MERGER_SCORE_PLUS;
   auto output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] + test.scores2[row_id]));
   }
@@ -514,7 +514,7 @@ void test_left() {
   options.score_operator_type = grnxx::MERGER_SCORE_MINUS;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] - test.scores2[row_id]));
   }
@@ -523,7 +523,7 @@ void test_left() {
   options.score_operator_type = grnxx::MERGER_SCORE_MULTIPLICATION;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] * test.scores2[row_id]));
   }
@@ -532,7 +532,7 @@ void test_left() {
   options.score_operator_type = grnxx::MERGER_SCORE_LEFT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id]));
   }
@@ -541,7 +541,7 @@ void test_left() {
   options.score_operator_type = grnxx::MERGER_SCORE_RIGHT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true());
     assert(output[i].score.match(test.scores2[row_id]));
   }
@@ -550,9 +550,9 @@ void test_left() {
   options.score_operator_type = grnxx::MERGER_SCORE_ZERO;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool_values[row_id].is_true());
-    assert(output[i].score.value() == 0.0);
+    assert(output[i].score.raw() == 0.0);
   }
 }
 
@@ -570,7 +570,7 @@ void test_right() {
   options.score_operator_type = grnxx::MERGER_SCORE_PLUS;
   auto output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] + test.scores2[row_id]));
   }
@@ -586,7 +586,7 @@ void test_right() {
   options.score_operator_type = grnxx::MERGER_SCORE_MINUS;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] - test.scores2[row_id]));
   }
@@ -595,7 +595,7 @@ void test_right() {
   options.score_operator_type = grnxx::MERGER_SCORE_MULTIPLICATION;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id] * test.scores2[row_id]));
   }
@@ -604,7 +604,7 @@ void test_right() {
   options.score_operator_type = grnxx::MERGER_SCORE_LEFT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores[row_id]));
   }
@@ -613,7 +613,7 @@ void test_right() {
   options.score_operator_type = grnxx::MERGER_SCORE_RIGHT;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool2_values[row_id].is_true());
     assert(output[i].score.match(test.scores2[row_id]));
   }
@@ -622,9 +622,9 @@ void test_right() {
   options.score_operator_type = grnxx::MERGER_SCORE_ZERO;
   output = merge_records(input_1, input_2, options);
   for (size_t i = 0; i < output.size(); ++i) {
-    size_t row_id = output[i].row_id.value();
+    size_t row_id = output[i].row_id.raw();
     assert(test.bool2_values[row_id].is_true());
-    assert(output[i].score.value() == 0.0);
+    assert(output[i].score.raw() == 0.0);
   }
 }
 

  Modified: test/test_pipeline.cpp (+4 -4)
===================================================================
--- test/test_pipeline.cpp    2014-11-25 12:49:26 +0900 (205159c)
+++ test/test_pipeline.cpp    2014-11-25 12:57:12 +0900 (1e1a381)
@@ -286,14 +286,14 @@ void test_sorter() {
   assert(records.size() == count);
 
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(test.bool_values[row_id].is_true());
     assert(records[i].score.match(test.float_values[row_id]));
   }
 
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t prev_row_id = records[i - 1].row_id.value();
-    size_t this_row_id = records[i].row_id.value();
+    size_t prev_row_id = records[i - 1].row_id.raw();
+    size_t this_row_id = records[i].row_id.raw();
     grnxx::Int prev_value = test.int_values[prev_row_id];
     grnxx::Int this_value = test.int_values[this_row_id];
     if (prev_value.is_na()) {
@@ -369,7 +369,7 @@ void test_merger() {
   assert(records.size() == count);
 
   for (size_t i = 0; i < records.size(); ++i) {
-    size_t row_id = records[i].row_id.value();
+    size_t row_id = records[i].row_id.raw();
     assert(test.bool_values[row_id].is_true() &&
            (test.int_values[row_id] < grnxx::Int(50)).is_true());
     assert(records[i].score.match(

  Modified: test/test_sorter.cpp (+26 -26)
===================================================================
--- test/test_sorter.cpp    2014-11-25 12:49:26 +0900 (20a12b7)
+++ test/test_sorter.cpp    2014-11-25 12:57:12 +0900 (8aaae88)
@@ -143,8 +143,8 @@ void test_bool() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Bool lhs_value = test.bool_values[lhs_row_id];
     grnxx::Bool rhs_value = test.bool_values[rhs_row_id];
     if (lhs_value.is_true()) {
@@ -164,8 +164,8 @@ void test_bool() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Bool lhs_value = test.bool_values[lhs_row_id];
     grnxx::Bool rhs_value = test.bool_values[rhs_row_id];
     if (lhs_value.is_false()) {
@@ -189,8 +189,8 @@ void test_bool() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Bool lhs_value = test.bool_values[lhs_row_id];
     grnxx::Bool rhs_value = test.bool_values[rhs_row_id];
     if (lhs_value.is_true()) {
@@ -222,8 +222,8 @@ void test_int() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Int lhs_value = test.int_values[lhs_row_id];
     grnxx::Int rhs_value = test.int_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -243,8 +243,8 @@ void test_int() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Int lhs_value = test.int_values[lhs_row_id];
     grnxx::Int rhs_value = test.int_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -268,8 +268,8 @@ void test_int() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Int lhs_value = test.int_values[lhs_row_id];
     grnxx::Int rhs_value = test.int_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -301,8 +301,8 @@ void test_float() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Float lhs_value = test.float_values[lhs_row_id];
     grnxx::Float rhs_value = test.float_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -322,8 +322,8 @@ void test_float() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Float lhs_value = test.float_values[lhs_row_id];
     grnxx::Float rhs_value = test.float_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -347,8 +347,8 @@ void test_float() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Float lhs_value = test.float_values[lhs_row_id];
     grnxx::Float rhs_value = test.float_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -380,8 +380,8 @@ void test_text() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Text lhs_value = test.text_values[lhs_row_id];
     grnxx::Text rhs_value = test.text_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -401,8 +401,8 @@ void test_text() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Text lhs_value = test.text_values[lhs_row_id];
     grnxx::Text rhs_value = test.text_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -426,8 +426,8 @@ void test_text() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Text lhs_value = test.text_values[lhs_row_id];
     grnxx::Text rhs_value = test.text_values[rhs_row_id];
     if (lhs_value.is_na()) {
@@ -468,8 +468,8 @@ void test_composite() {
 
   sorter->sort(&records);
   for (size_t i = 1; i < records.size(); ++i) {
-    size_t lhs_row_id = records[i - 1].row_id.value();
-    size_t rhs_row_id = records[i].row_id.value();
+    size_t lhs_row_id = records[i - 1].row_id.raw();
+    size_t rhs_row_id = records[i].row_id.raw();
     grnxx::Bool lhs_value = test.bool_values[lhs_row_id];
     grnxx::Bool rhs_value = test.bool_values[rhs_row_id];
     if (lhs_value.is_true()) {

  Modified: test/test_table.cpp (+40 -40)
===================================================================
--- test/test_table.cpp    2014-11-25 12:49:26 +0900 (172b642)
+++ test/test_table.cpp    2014-11-25 12:57:12 +0900 (b7f9f6a)
@@ -96,7 +96,7 @@ void test_rows() {
   // Append the first row.
   grnxx::Int row_id;
   row_id = table->insert_row();
-  assert(row_id.value() == 0);
+  assert(row_id.raw() == 0);
   assert(table->num_rows() == 1);
   assert(table->max_row_id().match(row_id));
   assert(!table->test_row(grnxx::Int(-1)));
@@ -104,10 +104,10 @@ void test_rows() {
   assert(!table->test_row(grnxx::Int(1)));
 
   // Append two more rows.
-  assert(table->insert_row().value() == 1);
-  assert(table->insert_row().value() == 2);
+  assert(table->insert_row().raw() == 1);
+  assert(table->insert_row().raw() == 2);
   assert(table->num_rows() == 3);
-  assert(table->max_row_id().value() == 2);
+  assert(table->max_row_id().raw() == 2);
   assert(table->test_row(grnxx::Int(0)));
   assert(table->test_row(grnxx::Int(1)));
   assert(table->test_row(grnxx::Int(2)));
@@ -116,7 +116,7 @@ void test_rows() {
   // Remove the second row.
   table->remove_row(grnxx::Int(1));
   assert(table->num_rows() == 2);
-  assert(table->max_row_id().value() == 2);
+  assert(table->max_row_id().raw() == 2);
   assert(table->test_row(grnxx::Int(0)));
   assert(!table->test_row(grnxx::Int(1)));
   assert(table->test_row(grnxx::Int(2)));
@@ -125,7 +125,7 @@ void test_rows() {
   // Remove the first row.
   table->remove_row(grnxx::Int(0));
   assert(table->num_rows() == 1);
-  assert(table->max_row_id().value() == 2);
+  assert(table->max_row_id().raw() == 2);
   assert(!table->test_row(grnxx::Int(0)));
   assert(!table->test_row(grnxx::Int(1)));
   assert(table->test_row(grnxx::Int(2)));
@@ -156,7 +156,7 @@ void test_bitmap() {
     assert(table->insert_row().match(row_id));
   }
   assert(table->num_rows() == NUM_ROWS);
-  assert(table->max_row_id().value() == (NUM_ROWS - 1));
+  assert(table->max_row_id().raw() == (NUM_ROWS - 1));
 
   // Remove all rows.
   for (size_t i = 0; i < NUM_ROWS; ++i) {
@@ -172,7 +172,7 @@ void test_bitmap() {
     assert(table->insert_row().match(row_id));
   }
   assert(table->num_rows() == NUM_ROWS);
-  assert(table->max_row_id().value() == (NUM_ROWS - 1));
+  assert(table->max_row_id().raw() == (NUM_ROWS - 1));
 
   // Remove rows with even IDs.
   for (size_t i = 0; i < NUM_ROWS; i += 2) {
@@ -180,7 +180,7 @@ void test_bitmap() {
     table->remove_row(row_id);
   }
   assert(table->num_rows() == (NUM_ROWS / 2));
-  assert(table->max_row_id().value() == (NUM_ROWS - 1));
+  assert(table->max_row_id().raw() == (NUM_ROWS - 1));
 
   // Insert rows again.
   for (size_t i = 0; i < NUM_ROWS; i += 2) {
@@ -188,7 +188,7 @@ void test_bitmap() {
     assert(table->insert_row().match(row_id));
   }
   assert(table->num_rows() == NUM_ROWS);
-  assert(table->max_row_id().value() == (NUM_ROWS - 1));
+  assert(table->max_row_id().raw() == (NUM_ROWS - 1));
 
   // Remove rows in reverse order.
   for (size_t i = 0; i < NUM_ROWS; ++i) {
@@ -204,7 +204,7 @@ void test_bitmap() {
     assert(table->insert_row().match(row_id));
   }
   assert(table->num_rows() == NUM_ROWS);
-  assert(table->max_row_id().value() == (NUM_ROWS - 1));
+  assert(table->max_row_id().raw() == (NUM_ROWS - 1));
 }
 
 void test_int_key() {
@@ -246,21 +246,21 @@ void test_int_key() {
   row_id = table->find_or_insert_row(grnxx::Int(2), &inserted);
   assert(inserted);
   column->get(row_id, &datum);
-  assert(datum.as_int().value() == 2);
+  assert(datum.as_int().raw() == 2);
   row_id = table->find_or_insert_row(grnxx::Int(20), &inserted);
   column->get(row_id, &datum);
-  assert(datum.as_int().value() == 20);
+  assert(datum.as_int().raw() == 20);
   row_id = table->find_or_insert_row(grnxx::Int(200), &inserted);
   column->get(row_id, &datum);
-  assert(datum.as_int().value() == 200);
+  assert(datum.as_int().raw() == 200);
 
   // Find rows by key.
-  assert(table->find_row(grnxx::Int(1)).value() == 0);
-  assert(table->find_row(grnxx::Int(10)).value() == 1);
-  assert(table->find_row(grnxx::Int(100)).value() == 2);
-  assert(table->find_row(grnxx::Int(2)).value() == 3);
-  assert(table->find_row(grnxx::Int(20)).value() == 4);
-  assert(table->find_row(grnxx::Int(200)).value() == 5);
+  assert(table->find_row(grnxx::Int(1)).raw() == 0);
+  assert(table->find_row(grnxx::Int(10)).raw() == 1);
+  assert(table->find_row(grnxx::Int(100)).raw() == 2);
+  assert(table->find_row(grnxx::Int(2)).raw() == 3);
+  assert(table->find_row(grnxx::Int(20)).raw() == 4);
+  assert(table->find_row(grnxx::Int(200)).raw() == 5);
   assert(table->find_row(grnxx::Int::na()).is_na());
 
   // Unset key column.
@@ -293,34 +293,34 @@ void test_text_key() {
   // Duplicate keys must be rejected.
   bool inserted = true;
   row_id = table->find_or_insert_row(grnxx::Text("1"), &inserted);
-  assert(row_id.value() == 0);
+  assert(row_id.raw() == 0);
   assert(!inserted);
   row_id = table->find_or_insert_row(grnxx::Text("12"), &inserted);
-  assert(row_id.value() == 1);
+  assert(row_id.raw() == 1);
   assert(!inserted);
   row_id = table->find_or_insert_row(grnxx::Text("123"), &inserted);
-  assert(row_id.value() == 2);
+  assert(row_id.raw() == 2);
   assert(!inserted);
 
   // Append new keys.
   grnxx::Datum datum;
   row_id = table->find_or_insert_row(grnxx::Text("A"), &inserted);
-  assert(row_id.value() == 3);
+  assert(row_id.raw() == 3);
   assert(inserted);
   row_id = table->find_or_insert_row(grnxx::Text("AB"), &inserted);
-  assert(row_id.value() == 4);
+  assert(row_id.raw() == 4);
   assert(inserted);
   row_id = table->find_or_insert_row(grnxx::Text("ABC"), &inserted);
-  assert(row_id.value() == 5);
+  assert(row_id.raw() == 5);
   assert(inserted);
 
   // Find rows by key.
-  assert(table->find_row(grnxx::Text("1")).value() == 0);
-  assert(table->find_row(grnxx::Text("12")).value() == 1);
-  assert(table->find_row(grnxx::Text("123")).value() == 2);
-  assert(table->find_row(grnxx::Text("A")).value() == 3);
-  assert(table->find_row(grnxx::Text("AB")).value() == 4);
-  assert(table->find_row(grnxx::Text("ABC")).value() == 5);
+  assert(table->find_row(grnxx::Text("1")).raw() == 0);
+  assert(table->find_row(grnxx::Text("12")).raw() == 1);
+  assert(table->find_row(grnxx::Text("123")).raw() == 2);
+  assert(table->find_row(grnxx::Text("A")).raw() == 3);
+  assert(table->find_row(grnxx::Text("AB")).raw() == 4);
+  assert(table->find_row(grnxx::Text("ABC")).raw() == 5);
   assert(table->find_row(grnxx::Text::na()).is_na());
 
   // Unset key column.
@@ -353,7 +353,7 @@ void test_cursor() {
   for (size_t i = 0; i < NUM_ROWS; ++i) {
     grnxx::Int row_id(i);
     assert(records[i].row_id.match(row_id));
-    assert(records[i].score.value() == 0.0);
+    assert(records[i].score.raw() == 0.0);
   }
   records.clear();
 
@@ -366,7 +366,7 @@ void test_cursor() {
   for (size_t i = 0; i < NUM_ROWS; ++i) {
     grnxx::Int row_id(NUM_ROWS - i - 1);
     assert(records[i].row_id.match(row_id));
-    assert(records[i].score.value() == 0.0);
+    assert(records[i].score.raw() == 0.0);
   }
   records.clear();
 
@@ -432,25 +432,25 @@ void test_reference() {
   grnxx::Datum datum;
   ref_column->get(grnxx::Int(0), &datum);
   assert(datum.type() == grnxx::INT_DATA);
-  assert(datum.as_int().value() == 0);
+  assert(datum.as_int().raw() == 0);
   ref_column->get(grnxx::Int(1), &datum);
   assert(datum.type() == grnxx::INT_DATA);
-  assert(datum.as_int().value() == 1);
+  assert(datum.as_int().raw() == 1);
   ref_column->get(grnxx::Int(2), &datum);
   assert(datum.type() == grnxx::INT_DATA);
-  assert(datum.as_int().value() == 1);
+  assert(datum.as_int().raw() == 1);
 
   to_table->remove_row(grnxx::Int(1));
 
   ref_column->get(grnxx::Int(0), &datum);
   assert(datum.type() == grnxx::INT_DATA);
-  assert(datum.as_int().value() == 0);
+  assert(datum.as_int().raw() == 0);
   ref_column->get(grnxx::Int(1), &datum);
   assert(datum.type() == grnxx::INT_DATA);
-  assert(datum.as_int().value() == 1);
+  assert(datum.as_int().raw() == 1);
   ref_column->get(grnxx::Int(2), &datum);
   assert(datum.type() == grnxx::INT_DATA);
-  assert(datum.as_int().value() == 1);
+  assert(datum.as_int().raw() == 1);
 }
 
 int main() {




More information about the Groonga-commit mailing list
Zurück zum Archiv-Index