@@ -1855,5 +1855,35 @@ TEST(AsofJoinTest, StructTestDataType) {
18551855 ])" );
18561856 AssertExecBatchesEqual (result.schema , {exp_batch}, result.batches );
18571857}
1858+
1859+ TEST (AsofJoinTest, MapTestDataType) {
1860+ auto map_type = map (int64 (), int64 ());
1861+
1862+ auto left_batch = ExecBatchFromJSON ({int64 ()}, R"( [[1], [2], [3]])" );
1863+ auto right_batch = ExecBatchFromJSON ({map_type, int64 ()}, R"( [
1864+ [[[11, 111], [22, 222]], 2],
1865+ [[[33, 333], [44, 444], [77, 777]], 3],
1866+ [[[55, 555], [66, 666]], 4]
1867+ ])" );
1868+
1869+ Declaration left{" exec_batch_source" ,
1870+ ExecBatchSourceNodeOptions (schema ({field (" on" , int64 ())}),
1871+ {std::move (left_batch)})};
1872+ Declaration right{
1873+ " exec_batch_source" ,
1874+ ExecBatchSourceNodeOptions (schema ({field (" col" , map_type), field (" on" , int64 ())}),
1875+ {std::move (right_batch)})};
1876+ AsofJoinNodeOptions asof_join_opts ({{{" on" }, {}}, {{" on" }, {}}}, 1 );
1877+ Declaration asof_join{
1878+ " asofjoin" , {std::move (left), std::move (right)}, std::move (asof_join_opts)};
1879+
1880+ ASSERT_OK_AND_ASSIGN (auto result, DeclarationToExecBatches (std::move (asof_join)));
1881+ auto exp_batch = ExecBatchFromJSON ({int64 (), map_type}, R"( [
1882+ [1, [[11, 111], [22, 222]]],
1883+ [2, [[11, 111], [22, 222]]],
1884+ [3, [[33, 333], [44, 444], [77, 777]]]
1885+ ])" );
1886+ AssertExecBatchesEqual (result.schema , {exp_batch}, result.batches );
1887+ }
18581888} // namespace acero
18591889} // namespace arrow
0 commit comments