Cast iron has a high carbon content that makes the metal brittle. Heat from welding shocks the surrounding metal and can crack the part right next to the weld. The fix is preheat to bring the whole piece up slowly, controlled cooldown to avoid thermal shock, and a specialty cast iron rod that matches the base metal.
Done wrong, the weld holds but the part cracks an inch away. Done right, cast iron welds last for years.