Fixes #33145 An integration test could be added. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>