In retail sales, I would guess Amazon could catch up to Walmart in 10 to 12 years if everything goes well for Amazon, assuming Walmart holds steady (which impressively they have so far). Walmart did finally grow for the first time in years in 2017, jumping from $485b in sales to $500b (they were stuck in the $482b-$485b range for three fiscal years).
Walmart has perhaps ~$450b in strictly retail sales globally. Amazon should be at something like $160b to $180b this year (in retail, including Whole Foods). Walmart's US retail sales were 270% larger than Amazon US for 2017. One of the not often discussed data points, is that Amazon's traditional online retail sales are no longer growing very quickly. That big retail growth slowdown has been hidden by the success of AWS and more recently advertising. I'd bet on their online sales growth being a slugfest going forward, with their online growth rate dropping to near single digits within a few years.
There's actually a very plausible scenario where Amazon never passes Walmart in retail. That premise is that it's between very difficult and impossible for Amazon's online sales to match what Walmart's epic physical store position makes possible in terms of retail sales volume. It's not a popular media premise though, the Amazon-crushes-all story is what sells. Perhaps Amazon will divert a lot more resources toward expanding physically going forward to counter that (at least they seem bent on that, maybe they've figured out that online retail sales will never match offline sales in the US).
Amazon so far has been mostly eating other retailers, and perhaps robbing Walmart of some growth it would otherwise have picked up. As Amazon pursues its next $100b in retail sales growth, is it possible for that to not detract from Walmart's $500b in sales? It's difficult to picture Amazon getting as big as Walmart in retail, without killing Walmart. If that does happen - they both survive intact - the rest of retail will be a complete wasteland of destruction (there's not enough growth in the US economy to accomodate two mainstream retailers the size of Walmart anytime soon, without a lot of other retail getting killed in the process).