return value.toString();
}
}
+
+ /**
+ * Interpret a boolean value (null == false)
+ */
+ public static boolean toBooleanValue(Object obj) {
+ return ((obj != null) && ((Boolean)obj).booleanValue());
+ }
/**
* Swaps the bytes of the given numeric in place.
}
return obj;
}
-
+
}
buffer.put(col.write(row.get(index), 0));
}
if (col.getType() == DataType.BOOLEAN) {
- if (row.get(index) != null) {
- if (!((Boolean) row.get(index)).booleanValue()) {
- //Booleans are stored in the null mask
- nullMask.markNull(index);
- }
+ if(!Column.toBooleanValue(row.get(index))) {
+ //Booleans are stored in the null mask
+ nullMask.markNull(index);
}
} else if (row.get(index) == null) {
nullMask.markNull(index);