ISSUE
https://issues.apache.org/jira/browse/HIVE-18920
方式一
操作步骤
打patch
git switch master
git pull origin
git log --grep HIVE-18920
git format-patch -1 de61102e0c5ef6fd093a5aef97df0f8d2427d39e // -1 将当前commit生成一个patch文件
切换到目标分支
git switch emr-2.3.7
git pull origin
校验
git apply --check 0001-HIVE-18920-CBO-Initialize-the-Janino-providers-ahead.patch
应用patch,这里有冲突的内容会写到*.rej文件中,然后手动处理
git apply --reject 0001-HIVE-18920-CBO-Initialize-the-Janino-providers-ahead.patch
提交
git commit -a -m "注释"
git push
方式二
通过 git cherry-pick,参考 https://www.ruanyifeng.com/blog/2020/04/git-cherry-pick.html