Skip to content

Commit 0e117e3

Browse files
committed
temp storage
1 parent acfab5a commit 0e117e3

6 files changed

Lines changed: 2202 additions & 1890 deletions

File tree

sqlgpt_parser/parser/oceanbase_parser/parser.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,6 @@ def p_table_name_opt_wild(p):
411411
p[0] = QualifiedName(parts=[p[1]])
412412

413413

414-
def p_opt_asterisk(p):
415-
r"""opt_asterisk : PERIOD ASTERISK
416-
| empty"""
417-
pass
418-
419-
420414
def p_update(p):
421415
r"""update : UPDATE relations SET assignment_list where_opt order_by_opt limit_opt"""
422416
p_limit = p[7]
@@ -1649,7 +1643,7 @@ def p_window_func_call(p):
16491643
| ROW_NUMBER LPAREN RPAREN over_clause
16501644
"""
16511645
length = len(p)
1652-
window_spec = p[length-1]
1646+
window_spec = p[length - 1]
16531647
args = []
16541648
ignore_null = None
16551649

@@ -1805,6 +1799,7 @@ def p_frame_between(p):
18051799
r"""frame_between : BETWEEN frame_start AND frame_end"""
18061800
p[0] = WindowFrame(p.lineno(1), p.lexpos(1), start=p[2], end=p[4])
18071801

1802+
18081803
def p_frame_expr(p):
18091804
r"""frame_expr : figure
18101805
| time_interval"""
@@ -2231,7 +2226,7 @@ def p_string_operator_func_call(p):
22312226
if length > 4:
22322227
for i in range(3, length, 2):
22332228
arguments.append(p[i])
2234-
arguments.extend(call_list)
2229+
arguments.extend(call_list)
22352230
p[0] = FunctionCall(p.lineno(1), p.lexpos(1), name=p[1], arguments=arguments)
22362231

22372232

@@ -2563,6 +2558,7 @@ def p_json_table_column(p):
25632558
column_type=JsonTableColumn.ColumnType.NESTED,
25642559
path=p[3], column_list=p[6])
25652560

2561+
25662562
def p_on_empty_or_error_opt(p):
25672563
r"""on_empty_or_error_opt : json_table_value_opt ON EMPTY
25682564
| json_table_value_opt ON ERROR
@@ -2973,6 +2969,7 @@ def p_boolean_value(p):
29732969
| FALSE"""
29742970
p[0] = BooleanLiteral(p.lineno(1), p.lexpos(1), value=p[1])
29752971

2972+
29762973
def p_qualified_name_list(p):
29772974
r"""qualified_name_list : qualified_name_list COMMA qualified_name
29782975
| qualified_name"""
@@ -2982,6 +2979,7 @@ def p_qualified_name_list(p):
29822979
p[1].append(p[3])
29832980
p[0] = p[1]
29842981

2982+
29852983
def p_qualified_name(p):
29862984
r"""qualified_name : identifier
29872985
| identifier PERIOD identifier

sqlgpt_parser/parser/oceanbase_parser/parser_table.py

Lines changed: 1810 additions & 1812 deletions
Large diffs are not rendered by default.

sqlgpt_parser/parser/odps_parser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,7 @@ def p_string_operator_func_call(p):
22382238
if length > 4:
22392239
for i in range(3, length, 2):
22402240
arguments.append(p[i])
2241-
arguments.extend(call_list)
2241+
arguments.extend(call_list)
22422242
p[0] = FunctionCall(p.lineno(1), p.lexpos(1), name=p[1], arguments=arguments)
22432243

22442244

0 commit comments

Comments
 (0)