Walmart reported third-quarter earnings and revenue that narrowly beat analyst estimates on Thursday, and it raised its full-year outlook. The retailer said global e-commerce sales grew 17%, led by store-fulfilled pickup and delivery. Walmart U.S. e-commerce rose 23%, and Sam's Club U.S. rose 30%.

Walmart U.S. advertising sales increased 37% for the quarter. The company said it cut prices on nearly 8,000 products across its stores.

CEO John Furner told CNBC's Becky Quick that Walmart has faced higher-than-expected diesel costs. He said tariff refunds have helped offset those costs and keep prices lower. "The reality is that increases in diesel fuel and transportation, they do work their way into cost of goods," Furner said. "So we're hoping to see these costs come down as soon as possible, and we'll keep prices as low as we can."

CFO John David Rainey said online growth for Walmart and Sam's Club came from faster delivery and lower prices. He said Walmart posted its largest share gains in food in three years during the quarter. "This was another really solid quarter for us, we feel good about it," Rainey said.

Walmart now expects net sales to rise 4.9% to 5.2%, up from its earlier forecast of 4% to 5%. It also raised its adjusted earnings-per-share estimate to $2.84 to $2.89, from $2.80 to $2.87. Rainey said Walmart is keeping "flexibility" in its guidance.

For the quarter ended Oct. 31, Walmart reported net income of $4.95 billion, or 62 cents per share, down from $6.14 billion, or 77 cents per share, a year earlier. Revenue rose 5.2%. Walmart U.S. net sales reached $125 billion, up 3.6%. Sam's Club net sales hit $25.9 billion, up 10%.

Furner said the company's AI shopping agent, Sparky, has driven average customer basket increases of 40%. Furner also said a joint Walmart+ and Sam's Club membership option has brought roughly two million new members to Sam's Club since late October. Rainey said consumers are "spending appreciably more" under the joint model.

Rainey said he is "optimistic" about holiday spending and that the fourth quarter is "off to a pretty good start."