Skip to content

Commit

Permalink
[Refactor](Prepared Statement) remove implementation in legacy planner
Browse files Browse the repository at this point in the history
  • Loading branch information
eldenmoon committed Aug 16, 2024
1 parent afa5684 commit ae5adb0
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 1,098 deletions.
18 changes: 0 additions & 18 deletions fe/fe-core/src/main/cup/sql_parser.cup
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,6 @@ nonterminal BackupStmt backup_stmt;
nonterminal AbstractBackupTableRefClause opt_backup_table_ref_list;
nonterminal Boolean backup_exclude_or_not;
nonterminal RestoreStmt restore_stmt;
nonterminal PrepareStmt prepare_stmt;
nonterminal ExecuteStmt execute_stmt;

nonterminal SelectList select_clause, select_list, select_sublist;

Expand Down Expand Up @@ -5869,22 +5867,6 @@ expr_or_default ::=
:}
;

prepare_stmt ::=
KW_PREPARE variable_name:name KW_FROM select_stmt:s
{:
RESULT = new PrepareStmt(s, name);
s.setPlaceHolders(parser.placeholder_expr_list);
parser.placeholder_expr_list.clear();
:}
;

execute_stmt ::=
KW_EXECUTE variable_name:name args_list:s
{:
RESULT = new ExecuteStmt(name, s);
:}
;

literal_values ::=
literal:value
{:
Expand Down
11 changes: 0 additions & 11 deletions fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,6 @@ public GlobalState(Env env, ConnectContext context) {

private final GlobalState globalState;

// Attached PrepareStmt
public PrepareStmt prepareStmt;

private final InferPredicateState inferPredicateState;

// An analyzer stores analysis state for a single select block. A select block can be
Expand Down Expand Up @@ -618,14 +615,6 @@ public int getCallDepth() {
return callDepth;
}

public void setPrepareStmt(PrepareStmt stmt) {
prepareStmt = stmt;
}

public PrepareStmt getPrepareStmt() {
return prepareStmt;
}

public void setInlineView(boolean inlineView) {
isInlineView = inlineView;
}
Expand Down

This file was deleted.

Loading

0 comments on commit ae5adb0

Please sign in to comment.