Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pegjs/postgresql.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -4547,7 +4547,7 @@ column_ref
column: { expr: col }
};
}
/ col:column_type {
/ col:column_type !LPAREN {
// => IGNORE
columnList.add(`select::null::${col.value}`);
return {
Expand Down
2 changes: 1 addition & 1 deletion pegjs/redshift.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -4025,7 +4025,7 @@ column_ref
column: { expr: col }
};
}
/ col:column_type {
/ col:column_type !LPAREN {
// => IGNORE
columnList.add(`select::null::${col.value}`);
return {
Expand Down
2 changes: 1 addition & 1 deletion pegjs/trino.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -3442,7 +3442,7 @@ column_ref
...getLocationObject()
};
}
/ col:column_type {
/ col:column_type !LPAREN {
// => IGNORE
columnList.add(`select::null::${col.value}`);
return {
Expand Down
3 changes: 3 additions & 0 deletions test/postgres.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,9 @@ describe('Postgres', () => {
}
})
expect(parser.sqlify(ast.ast, opt)).to.be.equals('SELECT "col1" + "col2" FROM "t1"')
sql = 'SELECT SUM("source"."point" + "other_source"."other_point") FROM foo';
ast = parser.parse(sql, opt)
expect(ast.columnList).to.be.eql(['select::source::point', 'select::other_source::other_point'])
})

it('should support conflict be empty', () => {
Expand Down