gitmodimo commented on code in PR #47391:
URL: https://github.com/apache/arrow/pull/47391#discussion_r3851511586
##########
cpp/src/arrow/acero/options.h:
##########
@@ -780,15 +780,15 @@ class ARROW_ACERO_EXPORT TableSinkNodeOptions : public
ExecNodeOptions {
/// \brief a row template that describes one row that will be generated for
each input row
struct ARROW_ACERO_EXPORT PivotLongerRowTemplate {
- PivotLongerRowTemplate(std::vector<std::string> feature_values,
+ PivotLongerRowTemplate(std::vector<std::shared_ptr<Scalar>> feature_values,
std::vector<std::optional<FieldRef>>
measurement_values)
: feature_values(std::move(feature_values)),
measurement_values(std::move(measurement_values)) {}
Review Comment:
I think so. Should It be deprecated or as is?
##########
cpp/src/arrow/acero/pivot_longer_node_test.cc:
##########
@@ -43,9 +43,15 @@ TEST(PivotLongerNode, Basic) {
->Table(kRowsPerBatch, kNumBatches);
PivotLongerNodeOptions options;
- options.feature_field_names = {"feature1", "feature2"};
+ options.feature_field_names = {"feature1", "feature2", "feature3"};
options.measurement_field_names = {"meas1", "meas2"};
- options.row_templates = {{{"a", "x"}, {{1}, {3}}}, {{"b", "y"}, {{2},
std::nullopt}}};
+ options.row_templates = {
+ {{std::make_shared<StringScalar>("a"),
std::make_shared<StringScalar>("x"),
+ std::make_shared<UInt32Scalar>(12)},
+ {{1}, {3}}},
+ {{std::make_shared<StringScalar>("b"),
std::make_shared<StringScalar>("y"),
+ std::make_shared<UInt32Scalar>(13)},
+ {{2}, std::nullopt}}};
Review Comment:
That will only work for string scalars. I will keep this test as mixed
scalar check and restore spelling in all others.
--
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]