Skip to content

Commit 334a5bf

Browse files
authored
Update CHANGELOG.md for 0.52.0 release, add scripts/ instructions for ASF releases (#1479)
1 parent d853c35 commit 334a5bf

14 files changed

+926
-127
lines changed

.github/workflows/rust.yml

-35
Original file line numberDiff line numberDiff line change
@@ -85,38 +85,3 @@ jobs:
8585
use-tool-cache: true
8686
- name: Test
8787
run: cargo test --all-features
88-
89-
test-coverage:
90-
runs-on: ubuntu-latest
91-
steps:
92-
- name: Checkout
93-
uses: actions/checkout@v4
94-
- name: Setup Rust Toolchain
95-
uses: ./.github/actions/setup-builder
96-
with:
97-
rust-version: stable
98-
- name: Install Tarpaulin
99-
uses: actions-rs/[email protected]
100-
with:
101-
crate: cargo-tarpaulin
102-
version: 0.14.2
103-
use-tool-cache: true
104-
- name: Coverage
105-
run: cargo tarpaulin -o Lcov --output-dir ./coverage
106-
- name: Coveralls
107-
uses: coverallsapp/github-action@master
108-
with:
109-
github-token: ${{ secrets.GITHUB_TOKEN }}
110-
111-
publish-crate:
112-
if: startsWith(github.ref, 'refs/tags/v0')
113-
runs-on: ubuntu-latest
114-
needs: [test]
115-
steps:
116-
- uses: actions/checkout@v4
117-
- name: Setup Rust Toolchain
118-
uses: ./.github/actions/setup-builder
119-
- name: Publish
120-
shell: bash
121-
run: |
122-
cargo publish --token ${{ secrets.CRATES_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/target/
44
/sqlparser_bench/target/
55
/derive/target/
6+
dev/dist
67

78
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
89
# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
2424
Given that the parser produces a typed AST, any changes to the AST will
2525
technically be breaking and thus will result in a `0.(N+1)` version.
2626

27+
2728
- Unreleased: Check https://github.com/sqlparser-rs/sqlparser-rs/commits/main for undocumented changes.
28-
- `0.51.0` and earlier: [changelog/0.51.0-pre.md](changelog/0.51.0-pre.md)
29+
- `0.52.0`: [changelog/0.52.0.md](changelog/0.52.0.md)
30+
- `0.51.0` and earlier: [changelog/0.51.0-pre.md](changelog/0.51.0-pre.md)

Cargo.toml

+4-10
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
[package]
1919
name = "sqlparser"
2020
description = "Extensible SQL Lexer and Parser with support for ANSI SQL:2011"
21-
version = "0.51.0"
22-
authors = ["Andy Grove <[email protected]>"]
23-
homepage = "https://github.com/sqlparser-rs/sqlparser-rs"
21+
version = "0.52.0"
22+
authors = ["Apache DataFusion <[email protected]>"]
23+
homepage = "https://github.com/apache/datafusion-sqlparser-rs"
2424
documentation = "https://docs.rs/sqlparser/"
2525
keywords = ["ansi", "sql", "lexer", "parser"]
26-
repository = "https://github.com/sqlparser-rs/sqlparser-rs"
26+
repository = "https://github.com/apache/datafusion-sqlparser-rs"
2727
license = "Apache-2.0"
2828
include = [
2929
"src/**/*.rs",
@@ -58,12 +58,6 @@ simple_logger = "5.0"
5858
matches = "0.1"
5959
pretty_assertions = "1"
6060

61-
[package.metadata.release]
62-
# Instruct `cargo release` to not run `cargo publish` locally:
63-
# https://github.com/sunng87/cargo-release/blob/master/docs/reference.md#config-fields
64-
# See docs/releasing.md for details.
65-
publish = false
66-
6761
[package.metadata.docs.rs]
6862
# Document these features on docs.rs
6963
features = ["serde", "visitor"]

changelog/0.52.0.md

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
# sqlparser-rs 0.52.0 Changelog
21+
22+
This release consists of 45 commits from 20 contributors. See credits at the end of this changelog for more information.
23+
24+
**Implemented enhancements:**
25+
26+
- feat: support explain options [#1426](https://github.com/apache/datafusion-sqlparser-rs/pull/1426) (kysshsy)
27+
- feat: adding Display implementation to DELETE and INSERT [#1427](https://github.com/apache/datafusion-sqlparser-rs/pull/1427) (seve-martinez)
28+
29+
**Fixed bugs:**
30+
31+
- fix: `maybe_parse` preventing parser from erroring on recursion limit [#1464](https://github.com/apache/datafusion-sqlparser-rs/pull/1464) (tomershaniii)
32+
33+
**Other:**
34+
35+
- Fix parsing of negative values [#1419](https://github.com/apache/datafusion-sqlparser-rs/pull/1419) (agscpp)
36+
- Allow to use ON CLUSTER cluster_name in TRUNCATE syntax [#1428](https://github.com/apache/datafusion-sqlparser-rs/pull/1428) (git-hulk)
37+
- chore: remove redundant punctuation [#1434](https://github.com/apache/datafusion-sqlparser-rs/pull/1434) (Fischer0522)
38+
- MS SQL Server: add support for IDENTITY column option [#1432](https://github.com/apache/datafusion-sqlparser-rs/pull/1432) (7phs)
39+
- Update to ASF header / add when missing [#1437](https://github.com/apache/datafusion-sqlparser-rs/pull/1437) (alamb)
40+
- Some small optimizations [#1424](https://github.com/apache/datafusion-sqlparser-rs/pull/1424) (exrok)
41+
- Fix `codestyle` CI check [#1438](https://github.com/apache/datafusion-sqlparser-rs/pull/1438) (alamb)
42+
- Implements CREATE POLICY syntax for PostgreSQL [#1440](https://github.com/apache/datafusion-sqlparser-rs/pull/1440) (git-hulk)
43+
- make `parse_expr_with_alias` public [#1444](https://github.com/apache/datafusion-sqlparser-rs/pull/1444) (Eason0729)
44+
- Implements DROP POLICY syntax for PostgreSQL [#1445](https://github.com/apache/datafusion-sqlparser-rs/pull/1445) (git-hulk)
45+
- Support `DROP DATABASE` [#1443](https://github.com/apache/datafusion-sqlparser-rs/pull/1443) (linhr)
46+
- Implements ALTER POLICY syntax for PostgreSQL [#1446](https://github.com/apache/datafusion-sqlparser-rs/pull/1446) (git-hulk)
47+
- Add a note discouraging new use of `dialect_of` macro [#1448](https://github.com/apache/datafusion-sqlparser-rs/pull/1448) (alamb)
48+
- Expand handling of `LIMIT 1, 2` handling to include sqlite [#1447](https://github.com/apache/datafusion-sqlparser-rs/pull/1447) (joshuawarner32)
49+
- Fix always uses CommentDef::WithoutEq while parsing the inline comment [#1453](https://github.com/apache/datafusion-sqlparser-rs/pull/1453) (git-hulk)
50+
- Add support for the LIKE ANY and ILIKE ANY pattern-matching condition [#1456](https://github.com/apache/datafusion-sqlparser-rs/pull/1456) (yoavcloud)
51+
- added ability to parse extension to parse_comment inside postgres dialect [#1451](https://github.com/apache/datafusion-sqlparser-rs/pull/1451) (MaxwellKnight)
52+
- Snowflake: support of views column comment [#1441](https://github.com/apache/datafusion-sqlparser-rs/pull/1441) (7phs)
53+
- Add SQLite "ON CONFLICT" column option in CREATE TABLE statements [#1442](https://github.com/apache/datafusion-sqlparser-rs/pull/1442) (nucccc)
54+
- Add support for ASC and DESC in CREATE TABLE column constraints for SQLite. [#1462](https://github.com/apache/datafusion-sqlparser-rs/pull/1462) (caldwell)
55+
- Add support of `EXPLAIN QUERY PLAN` syntax for SQLite dialect [#1458](https://github.com/apache/datafusion-sqlparser-rs/pull/1458) (git-hulk)
56+
- Add "DROP TYPE" support. [#1461](https://github.com/apache/datafusion-sqlparser-rs/pull/1461) (caldwell)
57+
- chore: Add asf.yaml [#1463](https://github.com/apache/datafusion-sqlparser-rs/pull/1463) (Xuanwo)
58+
- Add support for quantified comparison predicates (ALL/ANY/SOME) [#1459](https://github.com/apache/datafusion-sqlparser-rs/pull/1459) (yoavcloud)
59+
- MySQL dialect: Add support for hash comments [#1466](https://github.com/apache/datafusion-sqlparser-rs/pull/1466) (hansott)
60+
- Fix #1469 (SET ROLE regression) [#1474](https://github.com/apache/datafusion-sqlparser-rs/pull/1474) (lovasoa)
61+
- Add support for parsing MsSql alias with equals [#1467](https://github.com/apache/datafusion-sqlparser-rs/pull/1467) (yoavcloud)
62+
- Snowflake: support for extended column options in `CREATE TABLE` [#1454](https://github.com/apache/datafusion-sqlparser-rs/pull/1454) (7phs)
63+
- MsSQL TRY_CONVERT [#1477](https://github.com/apache/datafusion-sqlparser-rs/pull/1477) (yoavcloud)
64+
- Add PostgreSQL specfic "CREATE TYPE t AS ENUM (...)" support. [#1460](https://github.com/apache/datafusion-sqlparser-rs/pull/1460) (caldwell)
65+
- Fix build [#1483](https://github.com/apache/datafusion-sqlparser-rs/pull/1483) (yoavcloud)
66+
- Fix complex blocks warning when running clippy [#1488](https://github.com/apache/datafusion-sqlparser-rs/pull/1488) (git-hulk)
67+
- Add support for SHOW DATABASES/SCHEMAS/TABLES/VIEWS in Hive [#1487](https://github.com/apache/datafusion-sqlparser-rs/pull/1487) (yoavcloud)
68+
- Fix typo in `Dialect::supports_eq_alias_assigment` [#1478](https://github.com/apache/datafusion-sqlparser-rs/pull/1478) (alamb)
69+
- Add support for PostgreSQL `LISTEN/NOTIFY` syntax [#1485](https://github.com/apache/datafusion-sqlparser-rs/pull/1485) (wugeer)
70+
- Add support for TOP before ALL/DISTINCT [#1495](https://github.com/apache/datafusion-sqlparser-rs/pull/1495) (yoavcloud)
71+
- add support for `FOR ORDINALITY` and `NESTED` in JSON_TABLE [#1493](https://github.com/apache/datafusion-sqlparser-rs/pull/1493) (lovasoa)
72+
- Add Apache License to additional files [#1502](https://github.com/apache/datafusion-sqlparser-rs/pull/1502) (alamb)
73+
- Move CHANGELOG content [#1503](https://github.com/apache/datafusion-sqlparser-rs/pull/1503) (alamb)
74+
- improve support for T-SQL EXECUTE statements [#1490](https://github.com/apache/datafusion-sqlparser-rs/pull/1490) (lovasoa)
75+
76+
## Credits
77+
78+
Thank you to everyone who contributed to this release. Here is a breakdown of commits (PRs merged) per contributor.
79+
80+
```
81+
8 Andrew Lamb
82+
7 Yoav Cohen
83+
7 hulk
84+
3 Aleksei Piianin
85+
3 David Caldwell
86+
3 Ophir LOJKINE
87+
1 Agaev Guseyn
88+
1 Eason
89+
1 Fischer
90+
1 Hans Ott
91+
1 Heran Lin
92+
1 Joshua Warner
93+
1 Maxwell Knight
94+
1 Seve Martinez
95+
1 Siyuan Huang
96+
1 Thomas Dagenais
97+
1 Xuanwo
98+
1 nucccc
99+
1 tomershaniii
100+
1 wugeer
101+
```
102+
103+
Thank you also to everyone who contributed in other ways such as filing issues, reviewing PRs, and providing feedback on this release.
104+

dev/release/README.md

+181
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<!---
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
21+
## Process Overview
22+
23+
As part of the Apache governance model, official releases consist of signed
24+
source tarballs approved by the DataFusion PMC.
25+
26+
We then use the code in the approved artifacts to release to crates.io.
27+
28+
### Change Log
29+
30+
We maintain a `CHANGELOG.md` so our users know what has been changed between releases.
31+
32+
You will need a GitHub Personal Access Token for the following steps. Follow
33+
[these instructions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
34+
to generate one if you do not already have one.
35+
36+
The changelog is generated using a Python script which needs `PyGitHub`, installed using pip:
37+
38+
```shell
39+
pip3 install PyGitHub
40+
```
41+
42+
To generate the changelog, set the `GITHUB_TOKEN` environment variable to a valid token and then run the script
43+
providing two commit ids or tags followed by the version number of the release being created. The following
44+
example generates a change log of all changes between the first commit and the current HEAD revision.
45+
46+
```shell
47+
export GITHUB_TOKEN=<your-token-here>
48+
python ./dev/release/generate-changelog.py v0.51.0 HEAD 0.52.0 > changelog/0.52.0.md
49+
```
50+
51+
This script creates a changelog from GitHub PRs based on the labels associated with them as well as looking for
52+
titles starting with `feat:`, `fix:`, or `docs:`.
53+
54+
Add an entry to CHANGELOG.md for the new version
55+
56+
## Prepare release commits and PR
57+
58+
### Update Version
59+
60+
Checkout the main commit to be released
61+
62+
```shell
63+
git fetch apache
64+
git checkout apache/main
65+
```
66+
67+
Manually update the version in the root `Cargo.toml` to the release version (e.g. `0.52.0`).
68+
69+
Lastly commit the version change:
70+
71+
```shell
72+
git commit -a -m 'Update version'
73+
```
74+
75+
## Prepare release candidate artifacts
76+
77+
After the PR gets merged, you are ready to create release artifacts from the
78+
merged commit.
79+
80+
(Note you need to be a committer to run these scripts as they upload to the apache svn distribution servers)
81+
82+
### Pick a Release Candidate (RC) number
83+
84+
Pick numbers in sequential order, with `0` for `rc0`, `1` for `rc1`, etc.
85+
86+
### Create git tag for the release:
87+
88+
While the official release artifacts are signed tarballs and zip files, we also
89+
tag the commit it was created for convenience and code archaeology.
90+
91+
Using a string such as `v0.52.0` as the `<version>`, create and push the tag by running these commands:
92+
93+
For example to tag version `0.52.0`
94+
95+
```shell
96+
git fetch apache
97+
git tag v0.52.0-rc1 apache/main
98+
# push tag to Github remote
99+
git push apache v0.52.0-rc1
100+
```
101+
102+
### Create, sign, and upload artifacts
103+
104+
Run `create-tarball.sh` with the `<version>` tag and `<rc>` and you found in previous steps:
105+
106+
```shell
107+
GITHUB_TOKEN=<TOKEN> ./dev/release/create-tarball.sh 0.52.0 1
108+
```
109+
110+
The `create-tarball.sh` script
111+
112+
1. creates and uploads all release candidate artifacts to the [datafusion
113+
dev](https://dist.apache.org/repos/dist/dev/datafusion) location on the
114+
apache distribution svn server
115+
116+
2. provide you an email template to
117+
send to [email protected] for release voting.
118+
119+
### Vote on Release Candidate artifacts
120+
121+
Send the email output from the script to [email protected].
122+
123+
For the release to become "official" it needs at least three PMC members to vote +1 on it.
124+
125+
### Verifying Release Candidates
126+
127+
The `dev/release/verify-release-candidate.sh` is a script in this repository that can assist in the verification process. Run it like:
128+
129+
```shell
130+
./dev/release/verify-release-candidate.sh 0.52.0 1
131+
```
132+
133+
#### If the release is not approved
134+
135+
If the release is not approved, fix whatever the problem is, merge changelog
136+
changes into main if there is any and try again with the next RC number.
137+
138+
## Finalize the release
139+
140+
NOTE: steps in this section can only be done by PMC members.
141+
142+
### After the release is approved
143+
144+
Move artifacts to the release location in SVN, using the `release-tarball.sh` script:
145+
146+
```shell
147+
./dev/release/release-tarball.sh 0.52.0 1
148+
```
149+
150+
Congratulations! The release is now official!
151+
152+
### Publish on Crates.io
153+
154+
Only approved releases of the tarball should be published to
155+
crates.io, in order to conform to Apache Software Foundation
156+
governance standards.
157+
158+
A DataFusion committer can publish this crate after an official project release has
159+
been made to crates.io using the following instructions.
160+
161+
Follow [these
162+
instructions](https://doc.rust-lang.org/cargo/reference/publishing.html) to
163+
create an account and login to crates.io before asking to be added as an owner
164+
to the sqlparser DataFusion crates.
165+
166+
Download and unpack the official release tarball
167+
168+
Verify that the Cargo.toml in the tarball contains the correct version
169+
(e.g. `version = "0.52.0"`) and then publish the crates by running the following commands
170+
171+
```shell
172+
cargo publish
173+
```
174+
175+
If necessary, also publish the `sqlparser_derive` crate:
176+
177+
crates.io homepage: https://crates.io/crates/sqlparser_derive
178+
179+
```shell
180+
(cd derive && cargo publish
181+
```

0 commit comments

Comments
 (0)