MCPcopy Create free account
hub / github.com/BlazingDB/blazingsql / parse_sql

Method parse_sql

engine/src/io/data_parser/sql/AbstractSQLParser.cpp:120–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void abstractsql_parser::parse_sql(void *src,
121 const std::vector<int> &column_indices,
122 const std::vector<cudf::type_id> &cudf_types,
123 size_t row,
124 std::vector<void*> &host_cols,
125 std::vector<std::vector<cudf::bitmask_type>> &null_masks)
126{
127 for (int col = 0; col < column_indices.size(); ++col) {
128 size_t projection = column_indices[col];
129 uint8_t valid = 1; // 1: not null 0: null
130 cudf::type_id cudf_type_id = cudf_types[projection];
131 switch (cudf_type_id) {
132 case cudf::type_id::EMPTY: {} break;
133 case cudf::type_id::INT8: {
134 std::vector<int8_t> *v = (std::vector<int8_t>*)host_cols[col];
135 valid = this->parse_cudf_int8(src, col, row, v);
136 } break;
137 case cudf::type_id::INT16: {
138 std::vector<int16_t> *v = (std::vector<int16_t>*)host_cols[col];
139 valid = this->parse_cudf_int16(src, col, row, v);
140 } break;
141 case cudf::type_id::INT32: {
142 std::vector<int32_t> *v = (std::vector<int32_t>*)host_cols[col];
143 valid = this->parse_cudf_int32(src, col, row, v);
144 } break;
145 case cudf::type_id::INT64: {
146 std::vector<int64_t> *v = (std::vector<int64_t>*)host_cols[col];
147 valid = this->parse_cudf_int64(src, col, row, v);
148 } break;
149 case cudf::type_id::UINT8: {
150 std::vector<uint8_t> *v = (std::vector<uint8_t>*)host_cols[col];
151 valid = this->parse_cudf_uint8(src, col, row, v);
152 } break;
153 case cudf::type_id::UINT16: {
154 std::vector<uint16_t> *v = (std::vector<uint16_t>*)host_cols[col];
155 valid = this->parse_cudf_uint16(src, col, row, v);
156 } break;
157 case cudf::type_id::UINT32: {
158 std::vector<uint32_t> *v = (std::vector<uint32_t>*)host_cols[col];
159 valid = this->parse_cudf_uint32(src, col, row, v);
160 } break;
161 case cudf::type_id::UINT64: {
162 std::vector<uint64_t> *v = (std::vector<uint64_t>*)host_cols[col];
163 valid = this->parse_cudf_uint64(src, col, row, v);
164 } break;
165 case cudf::type_id::FLOAT32: {
166 std::vector<float> *v = (std::vector<float>*)host_cols[col];
167 valid = this->parse_cudf_float32(src, col, row, v);
168 } break;
169 case cudf::type_id::FLOAT64: {
170 std::vector<double> *v = (std::vector<double>*)host_cols[col];
171 valid = this->parse_cudf_float64(src, col, row, v);
172 } break;
173 case cudf::type_id::BOOL8: {
174 std::vector<int8_t> *v = (std::vector<int8_t>*)host_cols[col];
175 valid = this->parse_cudf_bool8(src, col, row, v);
176 } break;
177 case cudf::type_id::TIMESTAMP_DAYS:

Callers 1

read_sql_loopMethod · 0.80

Calls 14

sizeMethod · 0.80
parse_cudf_int8Method · 0.45
parse_cudf_int16Method · 0.45
parse_cudf_int32Method · 0.45
parse_cudf_int64Method · 0.45
parse_cudf_uint8Method · 0.45
parse_cudf_uint16Method · 0.45
parse_cudf_uint32Method · 0.45
parse_cudf_uint64Method · 0.45
parse_cudf_float32Method · 0.45
parse_cudf_float64Method · 0.45
parse_cudf_bool8Method · 0.45

Tested by

no test coverage detected