@@ -60,7 +60,6 @@ SlotDescriptor::SlotDescriptor(const TSlotDescriptor& tdesc)
6060 _col_unique_id(tdesc.col_unique_id),
6161 _slot_idx(tdesc.slotIdx),
6262 _field_idx(-1 ),
63- _is_materialized(tdesc.isMaterialized && tdesc.need_materialize),
6463 _is_key(tdesc.is_key),
6564 _column_paths(tdesc.column_paths),
6665 _is_auto_increment(tdesc.__isset.is_auto_increment ? tdesc.is_auto_increment : false ),
@@ -95,7 +94,6 @@ SlotDescriptor::SlotDescriptor(const PSlotDescriptor& pdesc)
9594 _col_unique_id(pdesc.col_unique_id()),
9695 _slot_idx(pdesc.slot_idx()),
9796 _field_idx(-1 ),
98- _is_materialized(pdesc.is_materialized()),
9997 _is_key(pdesc.is_key()),
10098 _column_paths(pdesc.column_paths().begin(), pdesc.column_paths().end()),
10199 _is_auto_increment(pdesc.is_auto_increment()) {}
@@ -109,7 +107,6 @@ SlotDescriptor::SlotDescriptor()
109107 _col_unique_id(0 ),
110108 _slot_idx(0 ),
111109 _field_idx(-1 ),
112- _is_materialized(true ),
113110 _is_key(false ),
114111 _is_auto_increment(false ) {}
115112#endif
@@ -124,7 +121,6 @@ void SlotDescriptor::to_protobuf(PSlotDescriptor* pslot) const {
124121 pslot->set_null_indicator_bit (_type->is_nullable () ? 0 : -1 );
125122 pslot->set_col_name (_col_name);
126123 pslot->set_slot_idx (_slot_idx);
127- pslot->set_is_materialized (_is_materialized);
128124 pslot->set_col_unique_id (_col_unique_id);
129125 pslot->set_is_key (_is_key);
130126 pslot->set_is_auto_increment (_is_auto_increment);
@@ -366,15 +362,12 @@ TupleDescriptor::TupleDescriptor(const PTupleDescriptor& pdesc, bool own_slots)
366362
367363void TupleDescriptor::add_slot (SlotDescriptor* slot) {
368364 _slots.push_back (slot);
365+ ++_num_materialized_slots;
369366
370- if (slot->is_materialized ()) {
371- ++_num_materialized_slots;
372-
373- if (is_complex_type (slot->type ()->get_primitive_type ()) ||
374- is_var_len_object (slot->type ()->get_primitive_type ()) ||
375- is_string_type (slot->type ()->get_primitive_type ())) {
376- _has_varlen_slots = true ;
377- }
367+ if (is_complex_type (slot->type ()->get_primitive_type ()) ||
368+ is_var_len_object (slot->type ()->get_primitive_type ()) ||
369+ is_string_type (slot->type ()->get_primitive_type ())) {
370+ _has_varlen_slots = true ;
378371 }
379372}
380373
@@ -565,13 +558,10 @@ std::string RowDescriptor::debug_string() const {
565558 return ss.str ();
566559}
567560
568- int RowDescriptor::get_column_id (int slot_id, bool force_materialize_slot ) const {
561+ int RowDescriptor::get_column_id (int slot_id) const {
569562 int column_id_counter = 0 ;
570563 for (auto * const tuple_desc : _tuple_desc_map) {
571564 for (auto * const slot : tuple_desc->slots ()) {
572- if (!force_materialize_slot && !slot->is_materialized ()) {
573- continue ;
574- }
575565 if (slot->id () == slot_id) {
576566 return column_id_counter;
577567 }
0 commit comments