Fixes #33145 An integration test could be added. --------- Co-authored-by: wxiaoguang <[email protected]>