in src/codecs/field_codecs.h [419:435]
inline void encode(PyObject *field_value, DxApi::DataWriter &writer) {
double value;
bool type_mismatch;
bool exists = getDoubleValue(field_value, value, type_mismatch);
if (type_mismatch)
THROW_EXCEPTION("Wrong type of field '%s'. Required: DOUBLE.", field_name_.c_str());
if (exists) {
writer.writeInt64(encodeDecimal64(value));
} else {
if (!is_nullable_) {
THROW_EXCEPTION("Field '%s' is not nullable.", field_name_.c_str());
}
writer.writeInt64(DECIMAL64_NULL);
}
}