spark infer and update schema