CNBC's Jim Cramer welcomed Tuesday's China-fueled rally that sent the stock market higher.

The Dow Jones Industrial Average gained more than 353 points, the advanced 0.97% and the Nasdaq Composite moved 1.39% as investors anticipate a U.S.-China trade deal and that the Federal Reserve cuts interest rates on Wednesday.

But the "Mad Money" host doubts a trade agreement will materialize when President Donald Trump meets with President Xi Jinping at the G-20 summit that begins next week in Japan.

"Because we've seen this movie before. I think President Xi called Trump like he did before the Buenos Aires meeting, when he tried to stop the first round of tariffs from rising to 25%," Cramer said. "But then the talks broke down and the tariffs went up. I think we can see a repeat."

There's too much optimism in the market, Cramer said, that China will agree to Trump's wish list. Trump wants China to address cyber theft, stop forced technology transfers, curb fentantyl distribution and end currency manipulation, a list that's too much for Xi's Communist Party of China, the host said.

"I do expect our stock market to be hammered if nothing positive comes of this G-20 meeting," he said, "and I'm now telling you that I think ... that the most likely outcome is nothing happens."

Cramer said the semiconductors, industrials and transports sectors, along with Apple, will be at risk of getting slammed if Wall Street is disappointed with the outcome.

He pointed out the chipmakers that rallied, such as Broadcom, Micron, Xilinx, Lam Research, Skyworks Solutions, Qorvo and Western Digital, would see their shares fall if Trump and Xi fail to reach a deal at the 20-nation summit.

As Trump threatens to slap a 25% tariff on $300 billion worth of Chinese goods, on top of the existing duties on $200 billion worth of imports, investors should expect Apple to take a hit if there is no exception for the iPhone maker.

The industrial stocks that rallied Tuesday are vulnerable again, Cramer said, but Caterpillar and Boeing have been punished enough.

"CAT's become much more of a service-oriented company than most people realize," he said. "Boeing's all about the future of the 737 Max. I think both stocks have real catalysts ahead, so I wouldn't sweat owning either of them."

Emerson Electric and 3M "might miss their numbers if there's no deal," Cramer said. He expects that United Technologies will be under pressure until the trade dispute is resolved.

The transports sector has been hurt by the trade war, but FedEx and railroad stocks are trying to stage a comeback, Cramer said.

"Now I know that on a day like today, nobody wants to hear any of that negative stuff. ... I mean there's tremendous optimism, but I think I got to present a realist view," the host said.

Cramer said there's one thing shareholders do not one to see: That "Fed Chief Jay Powell chooses to be less cautious, less vigilant about stopping a slowdown because of Trump's latest tweet, and [that] there's no deal at the G-20 summit.

"That's a real possibility and you can't afford to pretend otherwise, especially after today's magnificent run."