Skip to content

Commit b4c6aaa

Browse files
author
Rafał Hibner
committed
Test with int feature
1 parent ec487a3 commit b4c6aaa

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

cpp/src/arrow/acero/pivot_longer_node_test.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ TEST(PivotLongerNode, ExamplesFromTidyr2) {
198198
PivotLongerNodeOptions options;
199199
options.feature_field_names = {"week"};
200200
options.measurement_field_names = {"rank"};
201-
options.row_templates = {{{std::make_shared<StringScalar>("1")}, {{2}}},
202-
{{std::make_shared<StringScalar>("2")}, {{3}}}};
201+
options.row_templates = {{{std::make_shared<UInt32Scalar>(1)}, {{2}}},
202+
{{std::make_shared<UInt32Scalar>(2)}, {{3}}}};
203203

204204
Declaration plan = Declaration::Sequence(
205205
{{"table_source", TableSourceNodeOptions(std::move(input))},
@@ -212,14 +212,14 @@ TEST(PivotLongerNode, ExamplesFromTidyr2) {
212212
DeclarationToTable(std::move(plan)));
213213

214214
std::shared_ptr<Schema> expected_schema =
215-
schema({field("artist", utf8()), field("track", utf8()), field("week", utf8()),
215+
schema({field("artist", utf8()), field("track", utf8()), field("week", uint32()),
216216
field("rank", float64())});
217217
std::shared_ptr<Table> expected = TableFromJSON(expected_schema, {{
218218
R"([
219-
["2 Pac", "Baby Don't Cry", "1", 87],
220-
["2Ge+her", "The Hardest Part Of", "1", 91],
221-
["2 Pac", "Baby Don't Cry", "2", 82],
222-
["2Ge+her", "The Hardest Part Of", "2", 87]
219+
["2 Pac", "Baby Don't Cry", 1, 87],
220+
["2Ge+her", "The Hardest Part Of", 1, 91],
221+
["2 Pac", "Baby Don't Cry", 2, 82],
222+
["2Ge+her", "The Hardest Part Of", 2, 87]
223223
])"}});
224224

225225
AssertTablesEqual(*expected, *output, /*same_chunk_layout=*/false);

0 commit comments

Comments
 (0)