@@ -1230,7 +1230,7 @@ void StringFunctionsTest::testReplaceInPlace(
12301230 };
12311231
12321232 auto result = evaluate<FlatVector<StringView>>(
1233- fmt::format (" replace (c0, '{}', '{}')" , search, replace),
1233+ fmt::format (" presto_replace (c0, '{}', '{}')" , search, replace),
12341234 makeRowVector ({makeInput ()}));
12351235 testResults (result.get ());
12361236
@@ -1239,8 +1239,8 @@ void StringFunctionsTest::testReplaceInPlace(
12391239 auto applyReplaceFunction = [&](std::vector<VectorPtr>& functionInputs,
12401240 VectorPtr& resultPtr) {
12411241 core::QueryConfig config ({});
1242- auto replaceFunction =
1243- exec::getVectorFunction ( " replace " , {VARCHAR (), VARCHAR ()}, {}, config);
1242+ auto replaceFunction = exec::getVectorFunction (
1243+ " presto_replace " , {VARCHAR (), VARCHAR ()}, {}, config);
12441244 SelectivityVector rows (tests.size ());
12451245 ExprSet exprSet ({}, &execCtx_);
12461246 RowVectorPtr inputRows = makeRowVector ({});
@@ -1285,11 +1285,11 @@ void StringFunctionsTest::testReplaceFlatVector(
12851285
12861286 if (withReplaceArgument) {
12871287 result = evaluate<FlatVector<StringView>>(
1288- " replace (c0, c1, c2)" ,
1288+ " presto_replace (c0, c1, c2)" ,
12891289 makeRowVector ({stringVector, searchVector, replaceVector}));
12901290 } else {
12911291 result = evaluate<FlatVector<StringView>>(
1292- " replace (c0, c1)" , makeRowVector ({stringVector, searchVector}));
1292+ " presto_replace (c0, c1)" , makeRowVector ({stringVector, searchVector}));
12931293 }
12941294
12951295 for (int32_t i = 0 ; i < tests.size (); ++i) {
@@ -1331,8 +1331,8 @@ TEST_F(StringFunctionsTest, replace) {
13311331
13321332 // Test constant vectors
13331333 auto rows = makeRowVector (makeRowType ({BIGINT ()}), 10 );
1334- auto result =
1335- evaluate<SimpleVector<StringView>>( " replace ('high', 'ig', 'f')" , rows);
1334+ auto result = evaluate<SimpleVector<StringView>>(
1335+ " presto_replace ('high', 'ig', 'f')" , rows);
13361336 for (int i = 0 ; i < 10 ; ++i) {
13371337 EXPECT_EQ (result->valueAt (i), StringView (" hfh" ));
13381338 }
@@ -1351,7 +1351,8 @@ TEST_F(StringFunctionsTest, replaceWithReusableInputButNoInplace) {
13511351 [](vector_size_t ) { return 2851588633 ; },
13521352 [](auto row) { return row >= 50 ; });
13531353 auto result = evaluateSimplified<FlatVector<StringView>>(
1354- " substr(replace('bar', rtrim(c0)), c1, c2)" , makeRowVector ({c0, c1, c2}));
1354+ " substr(presto_replace('bar', rtrim(c0)), c1, c2)" ,
1355+ makeRowVector ({c0, c1, c2}));
13551356 ASSERT_EQ (result->size (), 100 );
13561357 for (int i = 0 ; i < 50 ; ++i) {
13571358 EXPECT_FALSE (result->isNullAt (i));
0 commit comments