File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
be/src/vec/exec/format/parquet Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -372,14 +372,17 @@ class Float16PhysicalConverter : public PhysicalToLogicalConverter {
372372 size_t length = src_data->size ();
373373 size_t num_values = length / _type_length;
374374 auto * to_float_column = assert_cast<ColumnFloat32*>(to_col.get ());
375+ size_t start_idx = to_float_column->size ();
376+ to_float_column->resize (start_idx + num_values);
377+ auto & to_float_column_data = to_float_column->get_data ();
375378 const uint8_t * ptr = src_data->get_data ().data ();
376379 for (int i = 0 ; i < num_values; ++i) {
377380 size_t offset = i * _type_length;
378381 const uint8_t * data_ptr = ptr + offset;
379382 uint16_t raw;
380383 memcpy (&raw, data_ptr, sizeof (uint16_t ));
381384 float value = half_to_float (raw);
382- to_float_column-> insert_value ( value) ;
385+ to_float_column_data[start_idx + i] = value;
383386 }
384387
385388 return Status::OK ();
You can’t perform that action at this time.
0 commit comments