Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Roseseed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wanxin Li
Roseseed
Commits
8d57d576
Commit
8d57d576
authored
5 years ago
by
JasonJPu
Browse files
Options
Downloads
Patches
Plain Diff
Fix issue
parent
99eed1da
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
Parser
+0
-0
0 additions, 0 deletions
Parser
SQLPGrammar.y
+2
-2
2 additions, 2 deletions
SQLPGrammar.y
SQLPParser
+0
-0
0 additions, 0 deletions
SQLPParser
util.c
+2
-3
2 additions, 3 deletions
util.c
util.h
+2
-1
2 additions, 1 deletion
util.h
util.o
+0
-0
0 additions, 0 deletions
util.o
with
6 additions
and
6 deletions
Parser
+
0
−
0
View file @
8d57d576
No preview for this file type
This diff is collapsed.
Click to expand it.
SQLPGrammar.y
+
2
−
2
View file @
8d57d576
...
@@ -89,11 +89,11 @@ Select_List
...
@@ -89,11 +89,11 @@ Select_List
}
}
| Col
| Col
{ printf("select list attr path\n");
{ printf("select list attr path\n");
$$ = create_
rename
_operator($1, NULL);
$$ = create_
assign
_operator($1, NULL);
}
}
| Col ',' Select_List
| Col ',' Select_List
{ printf("Select list\n");
{ printf("Select list\n");
$$ = create_
rename
_operator($1, $2);
$$ = create_
assign
_operator($1, $2);
}
}
;
;
...
...
This diff is collapsed.
Click to expand it.
SQLPParser
+
0
−
0
View file @
8d57d576
No preview for this file type
This diff is collapsed.
Click to expand it.
util.c
+
2
−
3
View file @
8d57d576
...
@@ -121,9 +121,8 @@ cons_cell* create_cross_operator(cons_cell* ra1, cons_cell* ra2) {
...
@@ -121,9 +121,8 @@ cons_cell* create_cross_operator(cons_cell* ra1, cons_cell* ra2) {
}
}
// For when you want to assign column names to another name
// For when you want to assign column names to another name
// THIS DOESN"T WORK FOR JASON"S COMPILER SO REVERTING BACK BUT LEFT HERE IN CASE WE NEED IT LATER XD
cons_cell
*
create_rename_operator
(
cons_cell
*
table
,
cons_cell
*
var
)
{
cons_cell
*
create_rename_operator
(
cons_cell
*
col
,
cons_cell
*
next
)
{
cons_cell
*
original_cons
=
create_cons_cell
(
table
,
var
);
cons_cell
*
original_cons
=
create_cons_cell
(
NULL
,
NULL
);
//col, next);
char
operator
[
7
]
=
"RENAME
\0
"
;
char
operator
[
7
]
=
"RENAME
\0
"
;
cons_cell
*
operator_cons
=
create_cons_cell_w_atom
(
operator
,
original_cons
);
cons_cell
*
operator_cons
=
create_cons_cell_w_atom
(
operator
,
original_cons
);
return
operator_cons
;
return
operator_cons
;
...
...
This diff is collapsed.
Click to expand it.
util.h
+
2
−
1
View file @
8d57d576
...
@@ -76,7 +76,8 @@ cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term
...
@@ -76,7 +76,8 @@ cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term
cons_cell
*
create_atom_operator
(
cons_cell
*
table
,
cons_cell
*
var
);
cons_cell
*
create_atom_operator
(
cons_cell
*
table
,
cons_cell
*
var
);
cons_cell
*
create_union_all_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
);
cons_cell
*
create_union_all_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
);
cons_cell
*
create_cross_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
);
cons_cell
*
create_cross_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
);
cons_cell
*
create_assign_operator
(
cons_cell
*
spcol
,
cons_cell
*
next
);
cons_cell
*
create_rename_operator
(
cons_cell
*
table
,
cons_cell
*
var
);
cons_cell
*
create_assign_operator
(
cons_cell
*
table
,
cons_cell
*
var
);
cons_cell
*
create_proj_operator
(
cons_cell
*
assign
,
cons_cell
*
ra
);
cons_cell
*
create_proj_operator
(
cons_cell
*
assign
,
cons_cell
*
ra
);
cons_cell
*
create_not_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
);
cons_cell
*
create_not_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
);
cons_cell
*
create_limit_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
);
cons_cell
*
create_limit_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
);
...
...
This diff is collapsed.
Click to expand it.
util.o
+
0
−
0
View file @
8d57d576
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment