SURPRISE, Ariz. — In baseball, there are splits, and there are splits.

Six years ago, in one of his heavy seasons with the Giants, Pablo Sandoval tore his hamstring when he forgot he was not a gymnast and did the splits at first base trying to catch a low throw.

By the time he got to Boston in 2015, Sandoval’s batting splits were just as ugly. When he reached 2-for-41 from the right side, the Red Sox told him to bat left-handed against everybody.

Things are different now.

Life seems better for Sandoval for the first time since he and the Giants, well, split up after he caught the final out of the 2014 World Series, signed with Boston and said a few caustic things about his former teammates as he headed out the door.

At 31, the Panda has learned a few things about humility and keeping his body in shape.

One test came Saturday when Sandoval played first base against the Reds, made a diving backhand catch at first base and then, to scoop a low throw, did the splits and walked off the field with his hammies intact.

“I’m flexible,” Sandoval said with a grin when he recounted the play the next day.

Assuming Sandoval makes the team, a fairly good bet, he could provide manager Bruce Bochy more flexibility in writing lineups, even allowing Bochy to give Buster Posey the occasional day off instead of planting him at first base when Brandon Belt sits.

The idea that Sandoval could start at first base and bat right-handed against left-handed pitching would have been absurd two or three years ago — but he has honed his defense at the position and finally, nearly two years after surgery to repair a torn labrum in his left shoulder, looks competent batting from the right side.

“One of the things to look for in spring training is to try to be healthy and work on things,” Sandoval said. “I feel great at home plate from both sides. When you don’t feel pain, it doesn’t affect your swing.”

Sandoval’s spot on the 25-man roster seems a fait accompli given the Giants’ financial commitment — they are responsible for only the major-league minimum, with the Red Sox paying the rest of his $18.6 million salary — and versatility.

“We’ll see how this shakes up, but you look at the bat,” Bochy said. “He’s swinging it well. He can play first base, third base, be the emergency catcher. That’s good to have, a threat off the bench.”

Sandoval would be the third choice to catch or play first base, but the latter is now a viable option if Belt has to miss time or even if Bochy wants to sit Belt and Posey in the same game.

Posey is caught in a ceaseless debate over whether he should move to first base to extend his career. One of the skirmishes is the argument that Bochy should rest Posey completely on days that Nick Hundley catches. That almost always happens against left-handed pitching.

The Giants might be able to survive more games without Posey for another reason: the additions of right-handed regulars Andrew McCutchen and Evan Longoria.

That was evident in an exhibition against the Rockies on Sunday, when the Giants won 13-0 behind substantial firepower from a lineup that had Austin Jackson, Hunter Pence, McCutchen, Longoria and Hundley as the top five. Pence and Hundley homered. So did Sandoval, batting seventh.

“Last year, we had no length there,” Bochy said, referring to the lineup.

Posey has not played an inning at first base this spring. Sandoval has played 36. Sandoval is batting .308 (12-for-39) with three doubles and two home runs.

Left-right batting splits are not provided in spring training, but Sandoval’s hitting from the right side passes the eye test.

“It’s going to be great,” Sandoval said. “If I make the team, I’ll be ready for every situation. This spring, I’ve seen a lot of left-handed pitchers. I’ve played first base. It doesn’t matter. I can handle it.”