Skip to content

Commit 70b5ea2

Browse files
authored
Merge fixes from dev-ion-doc feature branch back to main (#497)
* Rename `ion-rs` to `ion-rs_old` in preparation of upgrade (#492) * Refactor lexer into module & upgrade lexer & parser dependencies (#493) * Upgrade project deps to latest; use semver, not wildcard nor tilde (#494)
1 parent deff7a8 commit 70b5ea2

File tree

35 files changed

+1633
-1611
lines changed

35 files changed

+1633
-1611
lines changed

.github/workflows/ci_build_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- name: Rust Toolchain
9393
uses: dtolnay/rust-toolchain@master
9494
with:
95-
toolchain: nightly-2023-06-09
95+
toolchain: nightly-2024-08-06
9696
- uses: actions/cache@v3
9797
id: restore-build
9898
with:
@@ -132,7 +132,7 @@ jobs:
132132
- name: Rust Toolchain
133133
uses: dtolnay/rust-toolchain@master
134134
with:
135-
toolchain: nightly-2023-06-09
135+
toolchain: nightly-2024-08-06
136136
- uses: actions/cache@v3
137137
id: restore-build-and-conformance
138138
with:

deny.toml

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
# More documentation for the advisories section can be found here:
77
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
88
[advisories]
9-
vulnerability = "deny"
10-
unsound = "deny"
11-
unmaintained = "deny"
12-
yanked = "deny"
13-
notice = "warn"
9+
version = 2
1410

1511
ignore = [
1612
# Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0145
@@ -28,8 +24,7 @@ ignore = [
2824
# More documentation for the licenses section can be found here:
2925
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
3026
[licenses]
31-
# The lint level for crates which do not have a detectable license
32-
unlicensed = "deny"
27+
version = 2
3328
# ignores workspace crates that aren't published, or are only published to private registries.
3429
private = { ignore = true }
3530

@@ -62,29 +57,6 @@ exceptions = [
6257
{ allow = ["Unicode-DFS-2016"], name = "unicode-ident" },
6358
]
6459

65-
# Lint level for licenses considered copyleft
66-
copyleft = "deny"
67-
68-
# List of explicitly disallowed licenses
69-
# See https://spdx.org/licenses/ for list of possible licenses
70-
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
71-
deny = [
72-
]
73-
74-
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
75-
# * both - The license will be approved if it is both OSI-approved *AND* FSF
76-
# * either - The license will be approved if it is either OSI-approved *OR* FSF
77-
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
78-
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
79-
# * neither - This predicate is ignored and the default lint level is used
80-
allow-osi-fsf-free = "neither"
81-
82-
# Lint level used when no other predicates are matched
83-
# 1. License isn't in the allow or deny lists
84-
# 2. License isn't copyleft
85-
# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
86-
default = "deny"
87-
8860
# The confidence threshold for detecting a license from license text.
8961
# The higher the value, the more closely the license text must be to the
9062
# canonical license text of a valid SPDX license file.
@@ -125,7 +97,7 @@ allow = [
12597
deny = [
12698
# Use `once_cell` instead
12799
# `OnceCell`s API is under consideration for inclusion in `std`: https://github.com/rust-lang/rust/issues/74465
128-
{ name = "lazy_static", wrappers = ["Inflector", "criterion", "insta", "console"] },
100+
{ name = "lazy_static", wrappers = ["Inflector", "criterion", "insta", "console", "logos-codegen"] },
129101
# Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0071
130102
# `time` < 0.2.23 has a potential (though unlikely) potential segfault
131103
{ name = "time", version = "<0.2.23", wrappers = ["chrono"] },

extension/partiql-extension-ddl/Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repository.workspace = true
77
license = "Apache-2.0"
88
readme = "../../README.md"
99
keywords = ["sql", "ddl", "definition-language", "compilers", "interpreters"]
10-
categories = ["database", "compilers",]
10+
categories = ["database", "compilers", ]
1111
exclude = [
1212
"**/.git/**",
1313
"**/.github/**",
@@ -23,15 +23,14 @@ bench = false
2323
[dependencies]
2424
partiql-types = { path = "../../partiql-types", version = "0.10.*" }
2525

26-
ion-rs = "0.18.1"
2726
thiserror = "1.0"
28-
miette = { version = "7.2", features = ["fancy"] }
27+
miette = { version = "7", features = ["fancy"] }
2928
time = { version = "0.3", features = ["formatting", "parsing", "serde"] }
3029

31-
indexmap = "2.2"
30+
indexmap = "2.5"
3231

3332
[dev-dependencies]
34-
criterion = "0.4"
33+
criterion = "0.5"
3534

3635
[features]
3736
default = []

extension/partiql-extension-ddl/src/ddl.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use ion_rs::IonError;
21
use miette::Diagnostic;
32
use partiql_types::{
43
AnyOf, ArrayType, BagType, PartiqlShape, ShapeResultError, Static, StaticType, StructType,
@@ -13,8 +12,6 @@ use thiserror::Error;
1312
pub enum ShapeEncodingError {
1413
#[error("UnsupportedEncoding: {0}")]
1514
UnsupportedEncoding(String),
16-
#[error("IonEncodingError: {0}")]
17-
IonEncodingError(#[from] IonError),
1815
#[error("DateTimeEncodingError e: {0}")]
1916
DateTimeEncodingError(#[from] time::error::Format),
2017
#[error("Invalid Simulation Configuration e: {0}")]

extension/partiql-extension-ion-functions/Cargo.toml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ readme = "../../README.md"
99
keywords = ["sql", "parser", "query", "compilers", "interpreters"]
1010
categories = ["database", "compilers"]
1111
exclude = [
12-
"**/.git/**",
13-
"**/.github/**",
14-
"**/.travis.yml",
15-
"**/.appveyor.yml",
12+
"**/.git/**",
13+
"**/.github/**",
14+
"**/.travis.yml",
15+
"**/.appveyor.yml",
1616
]
1717
version.workspace = true
1818
edition.workspace = true
@@ -21,27 +21,28 @@ edition.workspace = true
2121
bench = false
2222

2323
[dependencies]
24-
partiql-extension-ion = {path = "../partiql-extension-ion", version = "0.10.*" }
24+
partiql-extension-ion = { path = "../partiql-extension-ion", version = "0.10.*" }
2525
partiql-value = { path = "../../partiql-value", version = "0.10.*" }
2626
partiql-catalog = { path = "../../partiql-catalog", version = "0.10.*" }
2727
partiql-logical = { path = "../../partiql-logical", version = "0.10.*" }
2828

29-
ordered-float = "3.*"
30-
itertools = "0.10.*"
31-
unicase = "2.6"
32-
rust_decimal = { version = "1.25.0", default-features = false, features = ["std"] }
33-
rust_decimal_macros = "1.26"
34-
ion-rs = "0.18"
29+
ordered-float = "4"
30+
itertools = "0.13"
31+
unicase = "2.7"
32+
rust_decimal = { version = "1.36.0", default-features = false, features = ["std"] }
33+
rust_decimal_macros = "1.36"
34+
ion-rs_old = { version = "0.18", package = "ion-rs" }
35+
ion-rs = { version = "1.0.0-rc.7", features = ["experimental"] }
3536
time = { version = "0.3", features = ["macros"] }
3637
once_cell = "1"
37-
regex = "1.7"
38+
regex = "1.10"
3839
thiserror = "1.0"
39-
delegate = "0.9"
40-
zstd = "0.12"
40+
delegate = "0.13"
41+
zstd = "0.13"
4142
flate2 = "1.0"
4243

4344
[dev-dependencies]
44-
criterion = "0.4"
45+
criterion = "0.5"
4546
partiql-parser = { path = "../../partiql-parser", version = "0.10.*" }
4647
partiql-logical = { path = "../../partiql-logical", version = "0.10.*" }
4748
partiql-logical-planner = { path = "../../partiql-logical-planner", version = "0.10.*" }

extension/partiql-extension-ion-functions/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![deny(rust_2018_idioms)]
22
#![deny(clippy::all)]
33

4-
use ion_rs::data_source::ToIonDataSource;
4+
use ion_rs_old::data_source::ToIonDataSource;
55
use partiql_catalog::call_defs::{CallDef, CallSpec, CallSpecArg};
66
use partiql_catalog::TableFunction;
77
use partiql_catalog::{
@@ -152,7 +152,7 @@ fn parse_ion_read<'a>(mut reader: impl 'a + Read + Seek) -> BaseTableExprResult<
152152

153153
fn parse_ion_buff<'a, I: 'a + ToIonDataSource>(input: I) -> BaseTableExprResult<'a> {
154154
let err_map = |e| Box::new(e) as BaseTableExprResultError;
155-
let reader = ion_rs::ReaderBuilder::new().build(input).unwrap();
155+
let reader = ion_rs_old::ReaderBuilder::new().build(input).unwrap();
156156
let decoder =
157157
IonDecoderBuilder::new(IonDecoderConfig::default().with_mode(Encoding::Ion)).build(reader);
158158
let decoder = decoder.map_err(err_map)?.map(move |it| it.map_err(err_map));

extension/partiql-extension-ion/Cargo.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ readme = "../../README.md"
99
keywords = ["sql", "parser", "query", "compilers", "interpreters"]
1010
categories = ["database", "compilers"]
1111
exclude = [
12-
"**/.git/**",
13-
"**/.github/**",
14-
"**/.travis.yml",
15-
"**/.appveyor.yml",
12+
"**/.git/**",
13+
"**/.github/**",
14+
"**/.travis.yml",
15+
"**/.appveyor.yml",
1616
]
1717
version.workspace = true
1818
edition.workspace = true
@@ -22,20 +22,21 @@ bench = false
2222

2323
[dependencies]
2424
partiql-value = { path = "../../partiql-value", version = "0.10.*" }
25-
ordered-float = "3.*"
26-
itertools = "0.10.*"
27-
unicase = "2.6"
28-
rust_decimal = { version = "1.25.0", default-features = false, features = ["std"] }
29-
rust_decimal_macros = "1.26"
30-
ion-rs = "0.18"
25+
ordered-float = "4"
26+
itertools = "0.13"
27+
unicase = "2.7"
28+
rust_decimal = { version = "1.36.0", default-features = false, features = ["std"] }
29+
rust_decimal_macros = "1.36"
30+
ion-rs_old = { version = "0.18", package = "ion-rs" }
31+
ion-rs = { version = "1.0.0-rc.7", features = ["experimental"] }
3132
time = { version = "0.3", features = ["macros"] }
3233
once_cell = "1"
33-
regex = "1.7"
34+
regex = "1.10"
3435
thiserror = "1.0"
35-
delegate = "0.9"
36+
delegate = "0.13"
3637

3738
[dev-dependencies]
38-
criterion = "0.4"
39+
criterion = "0.5"
3940

4041
[features]
4142
default = []

extension/partiql-extension-ion/src/decode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use delegate::delegate;
2-
use ion_rs::{Decimal, Int, IonError, IonReader, IonType, StreamItem, Symbol};
2+
use ion_rs_old::{Decimal, Int, IonError, IonReader, IonType, StreamItem, Symbol};
33
use once_cell::sync::Lazy;
44
use partiql_value::{Bag, DateTime, List, Tuple, Value};
55
use regex::RegexSet;

extension/partiql-extension-ion/src/encode.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use delegate::delegate;
22

3-
use ion_rs::{IonError, IonType, IonWriter};
3+
use ion_rs_old::{IonError, IonType, IonWriter};
44
use ordered_float::OrderedFloat;
55
use partiql_value::{Bag, DateTime, List, Tuple, Value};
66
use rust_decimal::Decimal;
@@ -218,7 +218,7 @@ where
218218
fn encode_decimal(&mut self, val: &Decimal) -> IonEncodeResult {
219219
let scale = i64::from(val.scale());
220220
let mantissa = val.mantissa();
221-
let dec = ion_rs::Decimal::new(mantissa, -scale);
221+
let dec = ion_rs_old::Decimal::new(mantissa, -scale);
222222
Ok(self.writer.write_decimal(&dec)?)
223223
}
224224

@@ -233,7 +233,7 @@ where
233233
fn encode_datetime(&mut self, val: &DateTime) -> IonEncodeResult {
234234
match val {
235235
DateTime::Timestamp(ts) => {
236-
let ts = ion_rs::Timestamp::with_ymd(
236+
let ts = ion_rs_old::Timestamp::with_ymd(
237237
ts.year() as u32,
238238
ts.month() as u32,
239239
u32::from(ts.day()),
@@ -249,7 +249,7 @@ where
249249
Ok(self.writer.write_timestamp(&ts)?)
250250
}
251251
DateTime::TimestampWithTz(ts) => {
252-
let ts = ion_rs::Timestamp::with_ymd(
252+
let ts = ion_rs_old::Timestamp::with_ymd(
253253
ts.year() as u32,
254254
ts.month() as u32,
255255
u32::from(ts.day()),
@@ -334,7 +334,7 @@ where
334334
self.inner
335335
.writer
336336
.set_annotations(std::iter::once(DATE_ANNOT));
337-
let ts = ion_rs::Timestamp::with_ymd(
337+
let ts = ion_rs_old::Timestamp::with_ymd(
338338
date.year() as u32,
339339
date.month() as u32,
340340
u32::from(date.day()),

0 commit comments

Comments
 (0)