Skip to content

Commit 541c52b

Browse files
committed
unskip lseg.sql
1 parent 78c0a2c commit 541c52b

File tree

16 files changed

+1698
-2
lines changed

16 files changed

+1698
-2
lines changed

crates/parser/tests/skipped.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ largeobject
102102
limit
103103
line
104104
lock
105-
lseg
106105
macaddr
107106
macaddr8
108107
matview
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
source: crates/parser/tests/statement_parser_test.rs
3+
description: "--\n-- LSEG\n-- Line segments\n--\n\n--DROP TABLE LSEG_TBL;\nCREATE TABLE LSEG_TBL (s lseg);"
4+
---
5+
Parse {
6+
cst: SourceFile@0..86
7+
SqlComment@0..2 "--"
8+
Newline@2..3 "\n"
9+
SqlComment@3..10 "-- LSEG"
10+
Newline@10..11 "\n"
11+
SqlComment@11..27 "-- Line segments"
12+
Newline@27..28 "\n"
13+
SqlComment@28..30 "--"
14+
Newline@30..32 "\n\n"
15+
SqlComment@32..54 "--DROP TABLE LSEG_TBL;"
16+
Newline@54..55 "\n"
17+
CreateStmt@55..86
18+
Create@55..61 "CREATE"
19+
Whitespace@61..62 " "
20+
Table@62..67 "TABLE"
21+
Whitespace@67..68 " "
22+
RangeVar@68..76
23+
Ident@68..76 "LSEG_TBL"
24+
Whitespace@76..77 " "
25+
Ascii40@77..78 "("
26+
ColumnDef@78..84
27+
Ident@78..79 "s"
28+
Whitespace@79..80 " "
29+
TypeName@80..84
30+
Ident@80..84 "lseg"
31+
Ascii41@84..85 ")"
32+
Ascii59@85..86 ";"
33+
,
34+
errors: [],
35+
stmts: [
36+
RawStmt {
37+
stmt: CreateStmt(
38+
CreateStmt {
39+
relation: Some(
40+
RangeVar {
41+
catalogname: "",
42+
schemaname: "",
43+
relname: "lseg_tbl",
44+
inh: true,
45+
relpersistence: "p",
46+
alias: None,
47+
location: 13,
48+
},
49+
),
50+
table_elts: [
51+
Node {
52+
node: Some(
53+
ColumnDef(
54+
ColumnDef {
55+
colname: "s",
56+
type_name: Some(
57+
TypeName {
58+
names: [
59+
Node {
60+
node: Some(
61+
String(
62+
String {
63+
sval: "lseg",
64+
},
65+
),
66+
),
67+
},
68+
],
69+
type_oid: 0,
70+
setof: false,
71+
pct_type: false,
72+
typmods: [],
73+
typemod: -1,
74+
array_bounds: [],
75+
location: 25,
76+
},
77+
),
78+
compression: "",
79+
inhcount: 0,
80+
is_local: true,
81+
is_not_null: false,
82+
is_from_type: false,
83+
storage: "",
84+
raw_default: None,
85+
cooked_default: None,
86+
identity: "",
87+
identity_sequence: None,
88+
generated: "",
89+
coll_clause: None,
90+
coll_oid: 0,
91+
constraints: [],
92+
fdwoptions: [],
93+
location: 23,
94+
},
95+
),
96+
),
97+
},
98+
],
99+
inh_relations: [],
100+
partbound: None,
101+
partspec: None,
102+
of_typename: None,
103+
constraints: [],
104+
options: [],
105+
oncommit: OncommitNoop,
106+
tablespacename: "",
107+
access_method: "",
108+
if_not_exists: false,
109+
},
110+
),
111+
range: 54..85,
112+
},
113+
],
114+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
source: crates/parser/tests/statement_parser_test.rs
3+
description: "-- NaN\n\n-- bad values for parser testing\nINSERT INTO LSEG_TBL VALUES ('(3asdf,2 ,3,4r2)');"
4+
---
5+
Parse {
6+
cst: SourceFile@0..90
7+
SqlComment@0..6 "-- NaN"
8+
Newline@6..8 "\n\n"
9+
SqlComment@8..40 "-- bad values for par ..."
10+
Newline@40..41 "\n"
11+
InsertStmt@41..90
12+
Insert@41..47 "INSERT"
13+
Whitespace@47..48 " "
14+
Into@48..52 "INTO"
15+
Whitespace@52..53 " "
16+
RangeVar@53..61
17+
Ident@53..61 "LSEG_TBL"
18+
Whitespace@61..62 " "
19+
SelectStmt@62..88
20+
Values@62..68 "VALUES"
21+
Whitespace@68..69 " "
22+
Ascii40@69..70 "("
23+
List@70..88
24+
AConst@70..88
25+
Sconst@70..88 "'(3asdf,2 ,3,4r2)'"
26+
Ascii41@88..89 ")"
27+
Ascii59@89..90 ";"
28+
,
29+
errors: [],
30+
stmts: [
31+
RawStmt {
32+
stmt: InsertStmt(
33+
InsertStmt {
34+
relation: Some(
35+
RangeVar {
36+
catalogname: "",
37+
schemaname: "",
38+
relname: "lseg_tbl",
39+
inh: true,
40+
relpersistence: "p",
41+
alias: None,
42+
location: 12,
43+
},
44+
),
45+
cols: [],
46+
select_stmt: Some(
47+
Node {
48+
node: Some(
49+
SelectStmt(
50+
SelectStmt {
51+
distinct_clause: [],
52+
into_clause: None,
53+
target_list: [],
54+
from_clause: [],
55+
where_clause: None,
56+
group_clause: [],
57+
group_distinct: false,
58+
having_clause: None,
59+
window_clause: [],
60+
values_lists: [
61+
Node {
62+
node: Some(
63+
List(
64+
List {
65+
items: [
66+
Node {
67+
node: Some(
68+
AConst(
69+
AConst {
70+
isnull: false,
71+
location: 29,
72+
val: Some(
73+
Sval(
74+
String {
75+
sval: "(3asdf,2 ,3,4r2)",
76+
},
77+
),
78+
),
79+
},
80+
),
81+
),
82+
},
83+
],
84+
},
85+
),
86+
),
87+
},
88+
],
89+
sort_clause: [],
90+
limit_offset: None,
91+
limit_count: None,
92+
limit_option: Default,
93+
locking_clause: [],
94+
with_clause: None,
95+
op: SetopNone,
96+
all: false,
97+
larg: None,
98+
rarg: None,
99+
},
100+
),
101+
),
102+
},
103+
),
104+
on_conflict_clause: None,
105+
returning_list: [],
106+
with_clause: None,
107+
r#override: OverridingNotSet,
108+
},
109+
),
110+
range: 40..89,
111+
},
112+
],
113+
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
source: crates/parser/tests/statement_parser_test.rs
3+
description: "INSERT INTO LSEG_TBL VALUES ('[1,2,3, 4');"
4+
---
5+
Parse {
6+
cst: SourceFile@0..42
7+
InsertStmt@0..42
8+
Insert@0..6 "INSERT"
9+
Whitespace@6..7 " "
10+
Into@7..11 "INTO"
11+
Whitespace@11..12 " "
12+
RangeVar@12..20
13+
Ident@12..20 "LSEG_TBL"
14+
Whitespace@20..21 " "
15+
SelectStmt@21..40
16+
Values@21..27 "VALUES"
17+
Whitespace@27..28 " "
18+
Ascii40@28..29 "("
19+
List@29..40
20+
AConst@29..40
21+
Sconst@29..40 "'[1,2,3, 4'"
22+
Ascii41@40..41 ")"
23+
Ascii59@41..42 ";"
24+
,
25+
errors: [],
26+
stmts: [
27+
RawStmt {
28+
stmt: InsertStmt(
29+
InsertStmt {
30+
relation: Some(
31+
RangeVar {
32+
catalogname: "",
33+
schemaname: "",
34+
relname: "lseg_tbl",
35+
inh: true,
36+
relpersistence: "p",
37+
alias: None,
38+
location: 12,
39+
},
40+
),
41+
cols: [],
42+
select_stmt: Some(
43+
Node {
44+
node: Some(
45+
SelectStmt(
46+
SelectStmt {
47+
distinct_clause: [],
48+
into_clause: None,
49+
target_list: [],
50+
from_clause: [],
51+
where_clause: None,
52+
group_clause: [],
53+
group_distinct: false,
54+
having_clause: None,
55+
window_clause: [],
56+
values_lists: [
57+
Node {
58+
node: Some(
59+
List(
60+
List {
61+
items: [
62+
Node {
63+
node: Some(
64+
AConst(
65+
AConst {
66+
isnull: false,
67+
location: 29,
68+
val: Some(
69+
Sval(
70+
String {
71+
sval: "[1,2,3, 4",
72+
},
73+
),
74+
),
75+
},
76+
),
77+
),
78+
},
79+
],
80+
},
81+
),
82+
),
83+
},
84+
],
85+
sort_clause: [],
86+
limit_offset: None,
87+
limit_count: None,
88+
limit_option: Default,
89+
locking_clause: [],
90+
with_clause: None,
91+
op: SetopNone,
92+
all: false,
93+
larg: None,
94+
rarg: None,
95+
},
96+
),
97+
),
98+
},
99+
),
100+
on_conflict_clause: None,
101+
returning_list: [],
102+
with_clause: None,
103+
r#override: OverridingNotSet,
104+
},
105+
),
106+
range: 0..41,
107+
},
108+
],
109+
}

0 commit comments

Comments
 (0)