IMPALA-4447: Rein in overly broad sed that dirties the tree This patch fixes a sed expression to make sure it only laters the code it is meant to alter, not the comment describing the code.
Tested with tests/run-tests.py query_test/test_udfs.py Change-Id: I51a0498d24b7fccc05b6183123501766cb36f85e Reviewed-on: http://gerrit.cloudera.org:8080/5008 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Internal Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/67758938 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/67758938 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/67758938 Branch: refs/heads/hadoop-next Commit: 67758938949496060c3cc7c7fb987e0b7c2c613f Parents: 27e9f0a Author: Jim Apple <[email protected]> Authored: Tue Nov 8 13:02:51 2016 -0800 Committer: Internal Jenkins <[email protected]> Committed: Wed Nov 9 02:44:36 2016 +0000 ---------------------------------------------------------------------- testdata/bin/copy-udfs-udas.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/67758938/testdata/bin/copy-udfs-udas.sh ---------------------------------------------------------------------- diff --git a/testdata/bin/copy-udfs-udas.sh b/testdata/bin/copy-udfs-udas.sh index 57c0bc7..5e5b804 100755 --- a/testdata/bin/copy-udfs-udas.sh +++ b/testdata/bin/copy-udfs-udas.sh @@ -53,13 +53,13 @@ then cd "${IMPALA_HOME}/tests/test-hive-udfs" "${IMPALA_HOME}/bin/mvn-quiet.sh" package cp target/test-hive-udfs-1.0.jar "${IMPALA_HOME}/testdata/udfs/impala-hive-udfs.jar" - # Change one of the Java files to make a new jar for testing - # purposes, then change it back + # Change one of the Java files to make a new jar for testing purposes, then change it + # back find . -type f -name 'TestUpdateUdf.java' -execdir \ - bash -c "sed -i s/'Old UDF'/'New UDF'/g '{}'" \; + bash -c "sed -i s/'Text(\"Old UDF\")'/'Text(\"New UDF\")'/g '{}'" \; "${IMPALA_HOME}/bin/mvn-quiet.sh" package find . -type f -name 'TestUpdateUdf.java' -execdir \ - bash -c "sed -i s/'New UDF'/'Old UDF'/g '{}'" \; + bash -c "sed -i s/'Text(\"New UDF\")'/'Text(\"Old UDF\")'/g '{}'" \; popd fi
