| 201 | } |
| 202 | |
| 203 | uint8_t mysql_parser::parse_cudf_float32(void *src, size_t col, size_t row, std::vector<float> *v) |
| 204 | { |
| 205 | auto res = (sql::ResultSet*)src; |
| 206 | ++col; // mysql count columns starting from 1 |
| 207 | long double raw_data = res->getDouble(col); |
| 208 | if (res->wasNull()) return 0; |
| 209 | float real_data = static_cast<float>(raw_data); |
| 210 | (*v)[row] = real_data; |
| 211 | return 1; |
| 212 | } |
| 213 | |
| 214 | uint8_t mysql_parser::parse_cudf_float64(void *src, size_t col, size_t row, std::vector<double> *v) |
| 215 | { |