Commit graph

362 commits

Author SHA1 Message Date
Joey Hain
40e2ecbdf3
snowflake: support for UNPIVOT and a fix for chained PIVOTs (#983) 2023-10-02 13:28:13 -04:00
Lukasz Stefaniak
2786c7eaf1
clickhouse: add support for LIMIT BY (#977) 2023-10-02 11:53:32 -04:00
Ulrich Schmidt-Goertz
6ffc3b3a52
Support DELETE with ORDER BY and LIMIT (MySQL) (#992) 2023-10-02 08:42:58 -04:00
Lukasz Stefaniak
4903bd4b8b
Add test for clickhouse: tokenize == as Token::DoubleEq (#981) 2023-10-02 07:39:44 -04:00
Lukasz Stefaniak
e718ce6c42
bigquery: EXTRACT support For DAYOFWEEK, DAYOFYEAR, ISOWEEK, TIME (#980) 2023-10-02 07:23:25 -04:00
chunshao.rcs
f6e4be4c15
Support mysql partition to table selection (#959)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-09-14 14:21:47 -04:00
Berkay Şahin
bb7b05e106
feat: Group By All (#964)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-09-08 06:47:56 -04:00
Forbes Lindesay
25e037c50f
feat: allow multiple actions in one ALTER TABLE statement (#960) 2023-09-07 16:39:47 -04:00
SeanTroyUWO
e0afd4b179
ANY and ALL contains their operators (#963) 2023-09-07 16:32:50 -04:00
dawg
b02c3f87ec
feat: show location info in parse errors (#958) 2023-09-07 16:23:09 -04:00
Andrew Lamb
14da37d182
Fix Rust 1.72 clippy lints (#957) 2023-08-25 12:21:31 -04:00
Marko Grujic
1ea8858575
Table time travel clause support, add visit_table_factor to Visitor (#951) 2023-08-22 06:06:32 -04:00
Forbes Lindesay
9a39afbe07
feat: support more Postgres index syntax (#943) 2023-08-17 11:47:11 -04:00
Jeremy Maness
8bbb85356c
Fix SUBSTRING from/to argument construction for mssql (#947) 2023-08-17 06:17:57 -04:00
liadgiladi
eb4be98980
Support DROP TEMPORARY TABLE, MySQL syntax (#916) 2023-08-07 10:54:24 -04:00
Ophir LOJKINE
10a6ec5637
Fix "BEGIN TRANSACTION" being serialized as "START TRANSACTION" (#935) 2023-07-27 07:32:55 -04:00
Ophir LOJKINE
53593f1982
Fix parsing of datetime functions without parenthesis (#930) 2023-07-26 15:47:02 -04:00
Andrew Lamb
3a412152b9
fix parsing of identifiers after % symbol (#927) 2023-07-21 05:55:41 -04:00
canalun
f98a2f9dca
feat: mysql no-escape mode (#870)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-07-19 16:36:52 -04:00
Igor Izvekov
df45db1375
fix: parsing JsonOperator (#913) 2023-07-17 15:03:48 -04:00
Andrew Lamb
4efe55dd8a
Remove most instances of #[cfg(feature(bigdecimal))] in tests (#910) 2023-07-17 14:19:51 -04:00
Jay Zhan
20ac38b4da
Support multi args for unnest (#909)
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-06-30 16:50:46 -04:00
liadgiladi
f05f71e20d
Support ALTER VIEW, MySQL syntax (#907)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-06-29 13:33:51 -04:00
Igor Izvekov
8877cbafa6
fix: unary negation operator with operators: Mul, Div and Mod (#902) 2023-06-22 11:15:31 -04:00
Sam Rijs
2b37e4ae6e
Add support for CREATE TYPE (AS) statements (#888)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-06-08 06:56:39 -04:00
Andrew Lamb
f740d528da
Fix merge conflict (#885) 2023-05-18 15:28:11 -04:00
Berkay Şahin
ef46cd3752
Named window frames (#881)
* after over clause, named window can be parsed with window ... as after having clause

* Lint errors are fixed

* Support for multiple windows

* fix lint errors

* simplifications

* rename function

* Rewrite named window search in functional style

* Test added and some minor changes

* Minor changes on tests and namings, and semantic check is removed

---------

Co-authored-by: Mustafa Akur <mustafa.akur@synnada.ai>
Co-authored-by: Mehmet Ozan Kabak <ozankabak@gmail.com>
2023-05-18 15:00:24 -04:00
Mustafa Akur
1b86abebe2
Add support for first, last aggregate function parsing (#882)
* Add order by parsing to functions

* Fix doc error

* minor changes
2023-05-18 14:59:14 -04:00
eitsupi
33b12acce7
feat: add DuckDB dialect (#878)
* feat: add DuckDB dialect

* formatting

* fix conflict

* support // in GenericDialect

* add DucDbDialect to all_dialects

* add comment from suggestion

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* fix: support // in GenericDialect

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-05-18 14:57:29 -04:00
Mustafa Akur
482a3ad417
Add support for multiple expressions, order by in aggregations (#879)
* Add support for multiple expressions, order by in aggregations

* Fix formatting errors

* Resolve linter errors
2023-05-17 13:04:33 -04:00
Armin Primadi
f15da8772e
Make Expr::Interval its own struct (#872)
* Make Expr::Interval its own struct

* Add test interval display

* Fix cargo fmt
2023-05-09 20:42:03 -04:00
Aljaž Mur Eržen
0113bbd924
Test trailing commas (#859)
* test: add tests for trailing commas

* tweaks
2023-05-01 08:31:17 -04:00
Aljaž Mur Eržen
3b1076c194
Support DISTINCT ON (...) (#852)
* Support "DISTINCT ON (...)"

* a test

* fix the merge
2023-04-27 15:34:54 -04:00
AviRaboah
f72e2ec382
Support multiple-table DELETE syntax (#855) 2023-04-27 11:41:20 -04:00
Andrew Lamb
00d071286b
Move tests from parser.rs to appropriate parse_XX tests (#845)
* Move tests from parser.rs to appropriate parse_XX tests

* move to postgres tests

* move more tests
2023-04-10 09:48:23 -04:00
pawel.leszczynski
29dea5d017
support PIVOT table syntax (#836)
Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
2023-03-26 07:33:35 -04:00
Maciej Skrzypkowski
a1b7341b87
Non-Latin characters support (#840)
* Non latin characters

---------

Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com>

* Test for mysql

---------

Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com>
2023-03-23 07:07:17 -04:00
Andrew Lamb
7f4c9132d7
Fix table alias parsing regression in 0.31.0 by backing out redshift column definition list (#827)
* Fix table alias parsing regression

* Revert "Support redshift's columns definition list for system information functions (#769)"

This reverts commit c35dcc93a7.
2023-03-06 11:43:22 -05:00
Mykhailo Bondarenko
1cf913e717
feat: Support PostgreSQL exponentiation. (#813)
* Add Postgres exponent operator

* Parse caret as BinaryOperator::PGExp in PostgreSQL

* Update sqlparser_postgres.rs

* update tests to support PGExp

* cargo fmt

* improve extensibility

* cargo fmt

* redundant code and documentation lionks
2023-03-02 10:39:39 -05:00
Y Togami
fbbf1a4e84
feat: support BIGNUMERIC of bigquery (#811)
* add tests

* bignumeric data type

* bignumeric keyword

* fix doc

* add exact_number_info

* fix doc

* check result string
2023-03-02 10:38:00 -05:00
Maciej Skrzypkowski
c35dcc93a7
Support redshift's columns definition list for system information functions (#769)
* parsing of redshift's column definition list for
pg_get_late_binding_view_cols
pg_get_cols
pg_get_grantee_by_iam_role
pg_get_iam_role_by_user

* Renamed ColsDefinition to TableAliasDefinition

added generic dialect

* Tests fixed

* Visitor for IdentPair

* Parsing redshift table alias based on indentifier and
parentheses instead of function name

* fix clippy

---------

Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-02-17 14:04:59 -05:00
Y Togami
79009f5448
feat: support JSON keyword (#799)
* feat: support json keyword for bigquery

* chore: fix test

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2023-02-17 13:46:30 -05:00
Y Togami
b31ede7733
chore: fix clippy error in ci (#803)
* chore: fix clippy error in ci

* chore: fix fmt
2023-02-17 13:24:50 -05:00
henry
61c661c234
Support ALTER INDEX {INDEX_NAME} RENAME TO {NEW_INDEX_NAME} (#767)
* test: add a case `rename_index`

* feat: add AlterIndex match arm

* fix: remove todo with self.expected

* chore: add comment to unreachable
2022-12-28 08:35:27 -05:00
Jeffrey
f0870fd315
Enable grouping sets parsing for GenericDialect (#771) 2022-12-28 08:31:39 -05:00
Andrew Lamb
79d0baad73
Add configurable recursion limit to parser, to protect against stack overflows (#764) 2022-12-28 08:29:51 -05:00
Jeffrey
2c20ec0be5
Support parsing scientific notation (such as 10e5) (#768) 2022-12-28 08:28:53 -05:00
Audun Skaugen
fb02344131
Generalize locking clause (#759)
Postgres supports more generalized locking clauses, for example:
FOR UPDATE OF <table_name> SKIP LOCKED

also, multiple locking clauses. Generalize the parser to support these.

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-12-13 17:19:07 -05:00
Ziinc
d420001c37
fix: unnest join constraint with alias parsing for BigQuery dialect (#732)
* fix: unnest join constraint with alias parsing for BigQuery dialect

* chore: fix failing tests
2022-12-13 16:44:45 -05:00
Wei-Ting Kuo
bda8268e56
add keyword NANOSECOND (#749) 2022-12-06 15:29:41 -05:00