zanmato1984 commented on code in PR #47391:
URL: https://github.com/apache/arrow/pull/47391#discussion_r3858874868
##########
cpp/src/arrow/acero/pivot_longer_node.cc:
##########
@@ -103,11 +105,28 @@ class PivotLongerNode : public ExecNode, public
TracedNode {
" measurement columns but one of the row templates only had ",
row_template.measurement_values.size(), " field references");
}
+
+ for (std::size_t i = 0; i < row_template.feature_values.size(); i++) {
Review Comment:
Could we reject null scalar pointers here? The new `shared_ptr<Scalar>` API
permits `nullptr`, which currently segfaults during schema inference instead of
returning an error. A typed null scalar should remain valid. It would also be
good to add a regression test for this case.
```suggestion
for (std::size_t i = 0; i < row_template.feature_values.size(); i++) {
if (!row_template.feature_values[i]) {
return Status::Invalid("Feature value at column ",
options.feature_field_names[i],
" must not be null");
}
```
--
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]