Skip to content

Commit

Permalink
Fix orc reader assert on create data_type in debug (#8706)
Browse files Browse the repository at this point in the history
The fix from #8174 got reverted in rework of `orc/reader_impl.cu` in #8599 
This PR reinstates the original fix to prevent an assert in debug mode in `gtests/ORC_TEST`

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Karthikeyan (https://github.com/karthikeyann)
  - Conor Hoekstra (https://github.com/codereport)

URL: #8706
  • Loading branch information
davidwendt authored Jul 12, 2021
1 parent 8320a15 commit 0b9ea01
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cpp/src/io/orc/reader_impl.cu
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,11 @@ std::unique_ptr<column> reader::impl::create_empty_column(const int32_t orc_col_
break;

case type_id::DECIMAL64:
scale = -static_cast<int32_t>(_metadata->get_types()[orc_col_id].scale.value_or(0));
default: out_col = make_empty_column(data_type(type, scale));
scale = -static_cast<int32_t>(_metadata->get_types()[orc_col_id].scale.value_or(0));
out_col = make_empty_column(data_type(type, scale));
break;

default: out_col = make_empty_column(data_type(type));
}

return out_col;
Expand Down

0 comments on commit 0b9ea01

Please sign in to comment.