pitrou commented on code in PR #41954:
URL: https://github.com/apache/arrow/pull/41954#discussion_r1626153754
##########
cpp/src/arrow/extension/fixed_shape_tensor.cc:
##########
@@ -207,19 +207,19 @@ std::shared_ptr<Array> FixedShapeTensorType::MakeArray(
Result<std::shared_ptr<Tensor>> FixedShapeTensorType::MakeTensor(
const std::shared_ptr<ExtensionScalar>& scalar) {
- const auto ext_scalar =
internal::checked_pointer_cast<ExtensionScalar>(scalar);
- const auto ext_type =
- internal::checked_pointer_cast<FixedShapeTensorType>(scalar->type);
+ const auto* ext_scalar = internal::checked_cast<const
ExtensionScalar*>(scalar.get());
Review Comment:
Since we're enhancing the code style, I would recommend const references
over const pointers where possible:
```suggestion
const auto& ext_scalar = internal::checked_cast<const
ExtensionScalar&>(*scalar.get);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]