function t = timeJoinWithTwoOutputs
% Run tall code on the local MATLAB session
mapreducer(0)
% Create sample data
keysVar = (1:5e3)';
keysVarShuffled = randi(5e3,1e4,1);
x = randi(1e5,1e4,1);
y = randi(10,5e3,1);
z = randi(1e3,5e3,1,"single");
zz = randi(1e3,1e4,1,"single");
% Create tall table
t = table(x,keysVarShuffled,zz,VariableNames=["X","keys","ZZ"]);
tallTable = tall(t);
% Create in-memory table
inMemoryTable = table(y,z,keysVar,VariableNames=["Y","Z","keys"]);
% Measure time for joinfunction joinWithTwoOutputs
[C,idxb] = join(tallTable,inMemoryTable);
gather(C,idxb);
end
t = timeit(@joinWithTwoOutputs);
end