MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / to_value

Method to_value

ciphercore-base/src/evaluators/join.rs:201–223  ·  view source on GitHub ↗
(&self, join_input: JoinInput)

Source from the content-addressed store, hash-verified

199 }
200
201 fn to_value(&self, join_input: JoinInput) -> Result<Value> {
202 // Collect all columns
203 let mut res_value_vec = vec![];
204 for (h, t) in join_input.result_headers_types.iter() {
205 if h == NULL_HEADER {
206 res_value_vec.push(Value::from_flattened_array(&self.null_column, BIT)?);
207 continue;
208 }
209 let col_ind = self.header_index_map[h];
210 let column_t = ColumnType::new((**t).clone(), self.has_column_masks(), h)?;
211 let data_val = Value::from_flattened_array(
212 &self.columns_data[col_ind],
213 column_t.get_scalar_type(),
214 )?;
215 if self.has_column_masks() {
216 let mask_val = Value::from_flattened_array(&self.columns_masks[col_ind], BIT)?;
217 res_value_vec.push(Value::from_vector(vec![mask_val, data_val]));
218 } else {
219 res_value_vec.push(data_val);
220 }
221 }
222 Ok(Value::from_vector(res_value_vec))
223 }
224}
225
226// (row_hash_key, row_index)

Callers 1

evaluate_joinFunction · 0.80

Calls 4

cloneMethod · 0.80
has_column_masksMethod · 0.80
pushMethod · 0.45
get_scalar_typeMethod · 0.45

Tested by

no test coverage detected