[fix](plsql) Fix plsql variable initialization (#33186)

This commit is contained in:
Xinyi Zou
2024-04-03 16:35:17 +08:00
committed by yiguolei
parent edd1701963
commit b696909775
7 changed files with 132 additions and 12 deletions

View File

@ -208,7 +208,3 @@ SYSDATE: 'SYSDATE';
VARIANCE: 'VARIANCE';
DOT2: '..';
LABEL_PL
: ([a-zA-Z] | DIGIT | '_')* ':'
;

View File

@ -522,7 +522,7 @@ for_range_stmt : // FOR (Integer range) statement
;
label_stmt :
LABEL_PL
IDENTIFIER COLON
| LT LT IDENTIFIER GT GT
;

View File

@ -2085,12 +2085,6 @@ public class Exec extends org.apache.doris.nereids.PLParserBaseVisitor<Integer>
public Integer visitLabel_stmt(Label_stmtContext ctx) {
if (ctx.IDENTIFIER() != null) {
exec.labels.push(ctx.IDENTIFIER().toString());
} else {
String label = ctx.LABEL_PL().getText();
if (label.endsWith(":")) {
label = label.substring(0, label.length() - 1);
}
exec.labels.push(label);
}
return 0;
}

View File

@ -59,7 +59,7 @@ public class DorisRowResult implements RowResult {
@Override
public boolean next() {
if (eof) {
if (eof || coord == null) {
return false;
}
try {