dbms: fixed error with 'replace' functions [#METR-18401].

This commit is contained in:
Alexey Milovidov 2015-10-11 07:25:02 +03:00
parent 62061c3969
commit ff06c18850
4 changed files with 304 additions and 10 deletions

View File

@ -75,7 +75,7 @@ struct PositionImpl
while (pos < end && end != (pos = searcher.search(pos, end - pos)))
{
/// Определим, к какому индексу оно относится.
while (begin + offsets[i] < pos)
while (begin + offsets[i] <= pos)
{
res[i] = 0;
++i;
@ -163,7 +163,7 @@ struct PositionUTF8Impl
while (pos < end && end != (pos = searcher.search(pos, end - pos)))
{
/// Определим, к какому индексу оно относится.
while (begin + offsets[i] < pos)
while (begin + offsets[i] <= pos)
{
res[i] = 0;
++i;
@ -364,7 +364,7 @@ public:
while (pos < end && end != (pos = searcher.find(pos, end)))
{
/// Определим, к какому индексу оно относится.
while (begin + offsets[i] < pos)
while (begin + offsets[i] <= pos)
{
res[i] = 0;
++i;
@ -627,7 +627,7 @@ public:
while (pos < end && end != (pos = searcher.find(pos, end)))
{
/// Определим, к какому индексу оно относится.
while (begin + offsets[i] < pos)
while (begin + offsets[i] <= pos)
{
res[i] = 0;
++i;
@ -898,7 +898,7 @@ struct MatchImpl
while (pos < end && end != (pos = searcher.search(pos, end - pos)))
{
/// Определим, к какому индексу оно относится.
while (begin + offsets[i] < pos)
while (begin + offsets[i] <= pos)
{
res[i] = revert;
++i;
@ -965,7 +965,7 @@ struct MatchImpl
while (pos < end && end != (pos = searcher.search(pos, end - pos)))
{
/// Определим, к какому индексу оно относится.
while (begin + offsets[i] < pos)
while (begin + offsets[i] <= pos)
{
res[i] = revert;
++i;
@ -1361,7 +1361,7 @@ struct ReplaceStringImpl
memcpy(&res_data[res_offset], pos, match - pos);
/// Определим, к какому индексу оно относится.
while (i < offsets.size() && begin + offsets[i] < match)
while (i < offsets.size() && begin + offsets[i] <= match)
{
res_offsets[i] = res_offset + ((begin + offsets[i]) - pos);
++i;
@ -1398,6 +1398,7 @@ struct ReplaceStringImpl
res_offset += (begin + offsets[i] - pos);
res_offsets[i] = res_offset;
pos = begin + offsets[i];
++i;
}
}
}
@ -1430,7 +1431,7 @@ struct ReplaceStringImpl
memcpy(&res_data[res_offset], pos, match - pos);
/// Определим, к какому индексу оно относится.
while (i < size && begin + n * (i + 1) < match)
while (i < size && begin + n * (i + 1) <= match)
{
res_offsets[i] = res_offset + ((begin + n * (i + 1)) - pos);
++i;

View File

@ -306,7 +306,7 @@ struct ExtractParamImpl
while (pos < end && end != (pos = searcher.search(pos, end - pos)))
{
/// Определим, к какому индексу оно относится.
while (begin + offsets[i] < pos)
while (begin + offsets[i] <= pos)
{
res[i] = 0;
++i;
@ -369,7 +369,7 @@ struct ExtractParamToStringImpl
while (pos < end && end != (pos = searcher.search(pos, end - pos)))
{
/// Определим, к какому индексу оно относится.
while (begin + offsets[i] < pos)
while (begin + offsets[i] <= pos)
{
res_data.push_back(0);
res_offsets[i] = res_data.size();

View File

@ -0,0 +1,192 @@
. . . 1
. . . 1
. . . 1
._ .o .o 1
. . . 1
_. o. o. 1
. . . 1
_._ o.o o.o 1
._ .o .o 1
. . . 1
._ .o .o 1
._ .o .o 1
._ .o .o 1
_. o. o. 1
._ .o .o 1
_._ o.o o.o 1
_. o. o. 1
. . . 1
_. o. o. 1
._ .o .o 1
_. o. o. 1
_. o. o. 1
_. o. o. 1
_._ o.o o.o 1
_._ o.o o.o 1
. . . 1
_._ o.o o.o 1
._ .o .o 1
_._ o.o o.o 1
_. o. o. 1
_._ o.o o.o 1
_._ o.o o.o 1
. . . 1
. . . 1
. . . 1
._ .oo .oo 1
. . . 1
_. oo. oo. 1
. . . 1
_._ oo.oo oo.oo 1
._ .oo .oo 1
. . . 1
._ .oo .oo 1
._ .oo .oo 1
._ .oo .oo 1
_. oo. oo. 1
._ .oo .oo 1
_._ oo.oo oo.oo 1
_. oo. oo. 1
. . . 1
_. oo. oo. 1
._ .oo .oo 1
_. oo. oo. 1
_. oo. oo. 1
_. oo. oo. 1
_._ oo.oo oo.oo 1
_._ oo.oo oo.oo 1
. . . 1
_._ oo.oo oo.oo 1
._ .oo .oo 1
_._ oo.oo oo.oo 1
_. oo. oo. 1
_._ oo.oo oo.oo 1
_._ oo.oo oo.oo 1
. . . 1
. . . 1
. . . 1
.__ .oo .oo 1
. . . 1
__. oo. oo. 1
. . . 1
__.__ oo.oo oo.oo 1
.__ .oo .oo 1
. . . 1
.__ .oo .oo 1
.__ .oo .oo 1
.__ .oo .oo 1
__. oo. oo. 1
.__ .oo .oo 1
__.__ oo.oo oo.oo 1
__. oo. oo. 1
. . . 1
__. oo. oo. 1
.__ .oo .oo 1
__. oo. oo. 1
__. oo. oo. 1
__. oo. oo. 1
__.__ oo.oo oo.oo 1
__.__ oo.oo oo.oo 1
. . . 1
__.__ oo.oo oo.oo 1
.__ .oo .oo 1
__.__ oo.oo oo.oo 1
__. oo. oo. 1
__.__ oo.oo oo.oo 1
__.__ oo.oo oo.oo 1
. . . 1
. . . 1
. . . 1
._ .o .o 1
. . . 1
_. o. o. 1
. . . 1
_._ o._ o._ 1
._ .o .o 1
. . . 1
._ .o .o 1
._ .o .o 1
._ .o .o 1
_. o. o. 1
._ .o .o 1
_._ o._ o._ 1
_. o. o. 1
. . . 1
_. o. o. 1
._ .o .o 1
_. o. o. 1
_. o. o. 1
_. o. o. 1
_._ o._ o._ 1
_._ o._ o._ 1
. . . 1
_._ o._ o._ 1
._ .o .o 1
_._ o._ o._ 1
_. o. o. 1
_._ o._ o._ 1
_._ o._ o._ 1
. . . 1
. . . 1
. . . 1
._ .oo .oo 1
. . . 1
_. oo. oo. 1
. . . 1
_._ oo._ oo._ 1
._ .oo .oo 1
. . . 1
._ .oo .oo 1
._ .oo .oo 1
._ .oo .oo 1
_. oo. oo. 1
._ .oo .oo 1
_._ oo._ oo._ 1
_. oo. oo. 1
. . . 1
_. oo. oo. 1
._ .oo .oo 1
_. oo. oo. 1
_. oo. oo. 1
_. oo. oo. 1
_._ oo._ oo._ 1
_._ oo._ oo._ 1
. . . 1
_._ oo._ oo._ 1
._ .oo .oo 1
_._ oo._ oo._ 1
_. oo. oo. 1
_._ oo._ oo._ 1
_._ oo._ oo._ 1
. . . 1
. . . 1
. . . 1
.__ .o_ .o_ 1
. . . 1
__. o_. o_. 1
. . . 1
__.__ o_.__ o_.__ 1
.__ .o_ .o_ 1
. . . 1
.__ .o_ .o_ 1
.__ .o_ .o_ 1
.__ .o_ .o_ 1
__. o_. o_. 1
.__ .o_ .o_ 1
__.__ o_.__ o_.__ 1
__. o_. o_. 1
. . . 1
__. o_. o_. 1
.__ .o_ .o_ 1
__. o_. o_. 1
__. o_. o_. 1
__. o_. o_. 1
__.__ o_.__ o_.__ 1
__.__ o_.__ o_.__ 1
. . . 1
__.__ o_.__ o_.__ 1
.__ .o_ .o_ 1
__.__ o_.__ o_.__ 1
__. o_. o_. 1
__.__ o_.__ o_.__ 1
__.__ o_.__ o_.__ 1

View File

@ -0,0 +1,101 @@
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '._']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '_.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '_._']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['._', '.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['._', '._']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['._', '_.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['._', '_._']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_.', '.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_.', '._']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_.', '_.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_.', '_._']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_._', '.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_._', '._']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_._', '_.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_._', '_._']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['.', '.']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['.', '._']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['.', '_.']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['.', '_._']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['._', '.']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['._', '._']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['._', '_.']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['._', '_._']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_.', '.']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_.', '._']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_.', '_.']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_.', '_._']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_._', '.']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_._', '._']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_._', '_.']) AS s);
SELECT s, replaceAll(s, '_', 'oo') AS a, replaceRegexpAll(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_._', '_._']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '.__']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '__.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '__.__']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.__', '.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.__', '.__']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.__', '__.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.__', '__.__']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.', '.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.', '.__']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.', '__.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.', '__.__']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.__', '.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.__', '.__']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.__', '__.']) AS s);
SELECT s, replaceAll(s, '_', 'o') AS a, replaceRegexpAll(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.__', '__.__']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '._']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '_.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '_._']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['._', '.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['._', '._']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['._', '_.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['._', '_._']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_.', '.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_.', '._']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_.', '_.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_.', '_._']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_._', '.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_._', '._']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_._', '_.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['_._', '_._']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['.', '.']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['.', '._']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['.', '_.']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['.', '_._']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['._', '.']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['._', '._']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['._', '_.']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['._', '_._']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_.', '.']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_.', '._']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_.', '_.']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_.', '_._']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_._', '.']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_._', '._']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_._', '_.']) AS s);
SELECT s, replaceOne(s, '_', 'oo') AS a, replaceRegexpOne(s, '_', 'oo') AS b, a = b FROM (SELECT arrayJoin(['_._', '_._']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '.__']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '__.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.', '__.__']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.__', '.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.__', '.__']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.__', '__.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['.__', '__.__']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.', '.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.', '.__']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.', '__.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.', '__.__']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.__', '.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.__', '.__']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.__', '__.']) AS s);
SELECT s, replaceOne(s, '_', 'o') AS a, replaceRegexpOne(s, '_', 'o') AS b, a = b FROM (SELECT arrayJoin(['__.__', '__.__']) AS s);