Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-scalar-var-expr
Browse files Browse the repository at this point in the history
  • Loading branch information
devanbenz committed May 5, 2024
2 parents 96dd382 + a86c58b commit 4f719e5
Show file tree
Hide file tree
Showing 34 changed files with 3,537 additions and 1,381 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,43 @@ changes that break via addition as "Added".
## [Unreleased]
Check https://github.com/sqlparser-rs/sqlparser-rs/commits/main for undocumented changes.

## [0.46.0] 2024-05-03

### Changed
* Consolidate representation of function calls, remove `AggregateExpressionWithFilter`, `ArraySubquery`, `ListAgg` and `ArrayAgg` (#1247) - Thanks jmhain
* Extended dialect trait to support numeric prefixed identifiers (#1188) - Thanks @groobyming
* Update simple_logger requirement from 4.0 to 5.0 (#1246) - Thanks @dependabot
* Improve parsing of JSON accesses on Postgres and Snowflake (#1215) - Thanks @jmhain
* Encapsulate Insert and Delete into specific structs (#1224) - Thanks @tisonkun
* Preserve double colon casts (and simplify cast representations) (#1221) - Thanks @jmhain

### Fixed
* Fix redundant brackets in Hive/Snowflake/Redshift (#1229) - Thanks @yuval-illumex

### Added
* Support values without parens in Snowflake and DataBricks (#1249) - Thanks @HiranmayaGundu
* Support WINDOW clause after QUALIFY when parsing (#1248) - Thanks @iffyio
* Support `DECLARE` parsing for mssql (#1235) - Thanks @devanbenz
* Support `?`-based jsonb operators in Postgres (#1242) - THanks @ReppCodes
* Support Struct datatype parsing for GenericDialect (#1241) - Thanks @duongcongtoai
* Support BigQuery window function null treatment (#1239) - Thanks @iffyio
* Support extend pivot operator - Thanks @iffyio
* Support Databricks SQL dialect (#1220) - Thanks @jmhain
* Support for MSSQL CONVERT styles (#1219) - Thanks @iffyio
* Support window clause using named window in BigQuery (#1237) - Thanks @iffyio
* Support for CONNECT BY (#1138) - Thanks @jmhain
* Support object constants in Snowflake (#1223) - Thanks @jmhain
* Support BigQuery MERGE syntax (#1217) - Thanks @iffyio
* Support for MAX for NVARCHAR (#1232) - Thanks @ bombsimon
* Support fixed size list types (#1231) - @@universalmind303
* Support Snowflake MATCH_RECOGNIZE syntax (#1222) - Thanks @jmhain
* Support quoted string backslash escaping (#1177) - Thanks @iffyio
* Support Modify Column for MySQL dialect (#1216) - Thanks @KKould
* Support `select * ilike` for snowflake (#1228) - Thanks @HiranmayaGundu
* Support wildcard replace in duckdb and snowflake syntax (#1226) - Thanks @HiranmayaGundu



## [0.45.0] 2024-04-12

### Added
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sqlparser"
description = "Extensible SQL Lexer and Parser with support for ANSI SQL:2011"
version = "0.45.0"
version = "0.46.0"
authors = ["Andy Grove <andygrove73@gmail.com>"]
homepage = "https://github.com/sqlparser-rs/sqlparser-rs"
documentation = "https://docs.rs/sqlparser/"
Expand Down Expand Up @@ -37,7 +37,7 @@ serde_json = { version = "1.0", optional = true }
sqlparser_derive = { version = "0.2.0", path = "derive", optional = true }

[dev-dependencies]
simple_logger = "4.0"
simple_logger = "5.0"
matches = "0.1"
pretty_assertions = "1"

Expand Down
6 changes: 2 additions & 4 deletions src/ast/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub enum DataType {
/// Variable-length character type e.g. VARCHAR(10)
Varchar(Option<CharacterLength>),
/// Variable-length character type e.g. NVARCHAR(10)
Nvarchar(Option<u64>),
Nvarchar(Option<CharacterLength>),
/// Uuid type
Uuid,
/// Large character object with optional length e.g. CHARACTER LARGE OBJECT, CHARACTER LARGE OBJECT(1000), [standard]
Expand Down Expand Up @@ -238,9 +238,7 @@ impl fmt::Display for DataType {

DataType::CharVarying(size) => format_character_string_type(f, "CHAR VARYING", size),
DataType::Varchar(size) => format_character_string_type(f, "VARCHAR", size),
DataType::Nvarchar(size) => {
format_type_with_optional_length(f, "NVARCHAR", size, false)
}
DataType::Nvarchar(size) => format_character_string_type(f, "NVARCHAR", size),
DataType::Uuid => write!(f, "UUID"),
DataType::CharacterLargeObject(size) => {
format_type_with_optional_length(f, "CHARACTER LARGE OBJECT", size, false)
Expand Down
Loading

0 comments on commit 4f719e5

Please sign in to comment.