[#7171] Support parsing OREPLACE() and STR_REPLACE()
This commit is contained in:
parent
96a5c5134a
commit
1ad67a1620
@ -4358,6 +4358,10 @@ final class ParserImpl implements Parser {
|
||||
|
||||
case 'o':
|
||||
case 'O':
|
||||
if (S.is(type))
|
||||
if ((field = parseFieldReplaceIf(ctx)) != null)
|
||||
return field;
|
||||
|
||||
if (N.is(type))
|
||||
if ((field = parseFieldOctetLengthIf(ctx)) != null)
|
||||
return field;
|
||||
@ -4425,6 +4429,8 @@ final class ParserImpl implements Parser {
|
||||
return field;
|
||||
else if ((field = parseFieldSpaceIf(ctx)) != null)
|
||||
return field;
|
||||
else if ((field = parseFieldReplaceIf(ctx)) != null)
|
||||
return field;
|
||||
|
||||
if (N.is(type))
|
||||
if ((field = parseFieldSecondIf(ctx)) != null)
|
||||
@ -5218,7 +5224,10 @@ final class ParserImpl implements Parser {
|
||||
}
|
||||
|
||||
private static final Field<?> parseFieldReplaceIf(ParserContext ctx) {
|
||||
if (parseFunctionNameIf(ctx, "REPLACE")) {
|
||||
if (parseFunctionNameIf(ctx, "REPLACE") ||
|
||||
parseFunctionNameIf(ctx, "OREPLACE") ||
|
||||
parseFunctionNameIf(ctx, "STR_REPLACE")) {
|
||||
|
||||
parse(ctx, '(');
|
||||
Field<String> f1 = (Field) parseField(ctx, S);
|
||||
parse(ctx, ',');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user