[HUDI-4356] Fix the error when sync hive in CTAS (#6029)