Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Jun 4, 2024
1 parent 4ec92e2 commit 6b13479
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/arrow/extension/fixed_shape_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Result<std::shared_ptr<Tensor>> FixedShapeTensorType::MakeTensor(
return Status::TypeError("Cannot convert non-fixed-width values to Tensor.");
}
const auto& array =
internal::checked_pointer_cast<const FixedSizeListScalar>(ext_scalar->value)->value;
internal::checked_cast<const FixedSizeListScalar*>(ext_scalar->value.get())->value;
if (array->null_count() > 0) {
return Status::Invalid("Cannot convert data with nulls to Tensor.");
}
Expand Down Expand Up @@ -264,6 +264,7 @@ Result<std::shared_ptr<FixedShapeTensorArray>> FixedShapeTensorArray::FromTensor

std::vector<std::string> dim_names;
if (!tensor->dim_names().empty()) {
dim_names.reserve(permutation.size());
for (auto i : permutation) {
dim_names.emplace_back(tensor->dim_names()[i]);
}
Expand Down

0 comments on commit 6b13479

Please sign in to comment.