A former cricketer in the Big Bash League, Barty reached her half-century for 2019 as she claimed her 50th win of the year on Wednesday.
She did so with a display of grit that would have been well suited to a long spell at the crease, winning 6-3 6-7 (5-7) 6-2 in two hours and 32 minutes.
The Australian becomes the second woman to reach 50 wins on Tour this year, drawing level with Karolina Pliskova.
Barty will next face Kvitova after the two-time Wimbledon champion overcame Belinda Bencic, while Bertens' reward for beating Polona Hercog is a match with Svitolina, whose three-set win over Sofia Kenin finished well after midnight.
Meanwhile, in a rematch of its Flushing Meadows quarter-final, Andreescu survived a second-set fightback from the Belgian to progress to the last 16 in Beijing.
Andreescu trailed 4-1 in the second set with Mertens, who had a set point to force a decider at 5-4.
However, Andreescu saved that before breaking back to force a tie-break, which she edged to complete a 6-3 7-6 (7-5) triumph.
Andreescu is unbeaten in 16 matches and has not lost a completed contest since March.
"Today was more of a battle mentally with myself than anything," the 19-year-old said. "I felt like I was getting very down on myself."I expect a lot from myself in general, but I have to realise not everything is going to go the way I want it to."
Petra Kvitova and Kiki Bertens also progressed along with Elina Svitolina, but Madison Keys was on the wrong end of a stunning turnaround from fellow American Jennifer Brady.