aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/udfs/common/string/test/cases/BlockReplace.sql
blob: 030e36050cde496e59561bf4573cd5c89817baad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* XXX: Enable UseBlocks pragma and provide input to trigger block execution. */
PRAGMA UseBlocks;

SELECT
    value,
    String::ReplaceAll(value, "as", "zzz") AS all,
    String::ReplaceFirst(value, "a", "z") AS first,
    String::ReplaceLast(value, "a", "z") AS last,
    String::ReplaceFirst(value, "a", "zz") AS first2,
    String::ReplaceLast(value, "a", "zz") AS last2,
    String::ReplaceFirst(value, "a", "") AS first3,
    String::ReplaceLast(value, "a", "") AS last3
FROM Input;