Skip to content

Commit

Permalink
Merge 7a8a028 into deff7a8
Browse files Browse the repository at this point in the history
  • Loading branch information
jpschorr authored Sep 17, 2024
2 parents deff7a8 + 7a8a028 commit 8098cea
Show file tree
Hide file tree
Showing 35 changed files with 1,633 additions and 1,611 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-06-09
toolchain: nightly-2024-08-06
- uses: actions/cache@v3
id: restore-build
with:
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-06-09
toolchain: nightly-2024-08-06
- uses: actions/cache@v3
id: restore-build-and-conformance
with:
Expand Down
34 changes: 3 additions & 31 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
vulnerability = "deny"
unsound = "deny"
unmaintained = "deny"
yanked = "deny"
notice = "warn"
version = 2

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

Expand Down Expand Up @@ -62,29 +57,6 @@ exceptions = [
{ allow = ["Unicode-DFS-2016"], name = "unicode-ident" },
]

# Lint level for licenses considered copyleft
copyleft = "deny"

# List of explicitly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
deny = [
]

# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
# * both - The license will be approved if it is both OSI-approved *AND* FSF
# * either - The license will be approved if it is either OSI-approved *OR* FSF
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
# * neither - This predicate is ignored and the default lint level is used
allow-osi-fsf-free = "neither"

# Lint level used when no other predicates are matched
# 1. License isn't in the allow or deny lists
# 2. License isn't copyleft
# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
default = "deny"

# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
# canonical license text of a valid SPDX license file.
Expand Down Expand Up @@ -125,7 +97,7 @@ allow = [
deny = [
# Use `once_cell` instead
# `OnceCell`s API is under consideration for inclusion in `std`: https://github.com/rust-lang/rust/issues/74465
{ name = "lazy_static", wrappers = ["Inflector", "criterion", "insta", "console"] },
{ name = "lazy_static", wrappers = ["Inflector", "criterion", "insta", "console", "logos-codegen"] },
# Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0071
# `time` < 0.2.23 has a potential (though unlikely) potential segfault
{ name = "time", version = "<0.2.23", wrappers = ["chrono"] },
Expand Down
9 changes: 4 additions & 5 deletions extension/partiql-extension-ddl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository.workspace = true
license = "Apache-2.0"
readme = "../../README.md"
keywords = ["sql", "ddl", "definition-language", "compilers", "interpreters"]
categories = ["database", "compilers",]
categories = ["database", "compilers", ]
exclude = [
"**/.git/**",
"**/.github/**",
Expand All @@ -23,15 +23,14 @@ bench = false
[dependencies]
partiql-types = { path = "../../partiql-types", version = "0.10.*" }

ion-rs = "0.18.1"
thiserror = "1.0"
miette = { version = "7.2", features = ["fancy"] }
miette = { version = "7", features = ["fancy"] }
time = { version = "0.3", features = ["formatting", "parsing", "serde"] }

indexmap = "2.2"
indexmap = "2.5"

[dev-dependencies]
criterion = "0.4"
criterion = "0.5"

[features]
default = []
3 changes: 0 additions & 3 deletions extension/partiql-extension-ddl/src/ddl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use ion_rs::IonError;
use miette::Diagnostic;
use partiql_types::{
AnyOf, ArrayType, BagType, PartiqlShape, ShapeResultError, Static, StaticType, StructType,
Expand All @@ -13,8 +12,6 @@ use thiserror::Error;
pub enum ShapeEncodingError {
#[error("UnsupportedEncoding: {0}")]
UnsupportedEncoding(String),
#[error("IonEncodingError: {0}")]
IonEncodingError(#[from] IonError),
#[error("DateTimeEncodingError e: {0}")]
DateTimeEncodingError(#[from] time::error::Format),
#[error("Invalid Simulation Configuration e: {0}")]
Expand Down
31 changes: 16 additions & 15 deletions extension/partiql-extension-ion-functions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ readme = "../../README.md"
keywords = ["sql", "parser", "query", "compilers", "interpreters"]
categories = ["database", "compilers"]
exclude = [
"**/.git/**",
"**/.github/**",
"**/.travis.yml",
"**/.appveyor.yml",
"**/.git/**",
"**/.github/**",
"**/.travis.yml",
"**/.appveyor.yml",
]
version.workspace = true
edition.workspace = true
Expand All @@ -21,27 +21,28 @@ edition.workspace = true
bench = false

[dependencies]
partiql-extension-ion = {path = "../partiql-extension-ion", version = "0.10.*" }
partiql-extension-ion = { path = "../partiql-extension-ion", version = "0.10.*" }
partiql-value = { path = "../../partiql-value", version = "0.10.*" }
partiql-catalog = { path = "../../partiql-catalog", version = "0.10.*" }
partiql-logical = { path = "../../partiql-logical", version = "0.10.*" }

ordered-float = "3.*"
itertools = "0.10.*"
unicase = "2.6"
rust_decimal = { version = "1.25.0", default-features = false, features = ["std"] }
rust_decimal_macros = "1.26"
ion-rs = "0.18"
ordered-float = "4"
itertools = "0.13"
unicase = "2.7"
rust_decimal = { version = "1.36.0", default-features = false, features = ["std"] }
rust_decimal_macros = "1.36"
ion-rs_old = { version = "0.18", package = "ion-rs" }
ion-rs = { version = "1.0.0-rc.7", features = ["experimental"] }
time = { version = "0.3", features = ["macros"] }
once_cell = "1"
regex = "1.7"
regex = "1.10"
thiserror = "1.0"
delegate = "0.9"
zstd = "0.12"
delegate = "0.13"
zstd = "0.13"
flate2 = "1.0"

[dev-dependencies]
criterion = "0.4"
criterion = "0.5"
partiql-parser = { path = "../../partiql-parser", version = "0.10.*" }
partiql-logical = { path = "../../partiql-logical", version = "0.10.*" }
partiql-logical-planner = { path = "../../partiql-logical-planner", version = "0.10.*" }
Expand Down
4 changes: 2 additions & 2 deletions extension/partiql-extension-ion-functions/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![deny(rust_2018_idioms)]
#![deny(clippy::all)]

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

fn parse_ion_buff<'a, I: 'a + ToIonDataSource>(input: I) -> BaseTableExprResult<'a> {
let err_map = |e| Box::new(e) as BaseTableExprResultError;
let reader = ion_rs::ReaderBuilder::new().build(input).unwrap();
let reader = ion_rs_old::ReaderBuilder::new().build(input).unwrap();
let decoder =
IonDecoderBuilder::new(IonDecoderConfig::default().with_mode(Encoding::Ion)).build(reader);
let decoder = decoder.map_err(err_map)?.map(move |it| it.map_err(err_map));
Expand Down
27 changes: 14 additions & 13 deletions extension/partiql-extension-ion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ readme = "../../README.md"
keywords = ["sql", "parser", "query", "compilers", "interpreters"]
categories = ["database", "compilers"]
exclude = [
"**/.git/**",
"**/.github/**",
"**/.travis.yml",
"**/.appveyor.yml",
"**/.git/**",
"**/.github/**",
"**/.travis.yml",
"**/.appveyor.yml",
]
version.workspace = true
edition.workspace = true
Expand All @@ -22,20 +22,21 @@ bench = false

[dependencies]
partiql-value = { path = "../../partiql-value", version = "0.10.*" }
ordered-float = "3.*"
itertools = "0.10.*"
unicase = "2.6"
rust_decimal = { version = "1.25.0", default-features = false, features = ["std"] }
rust_decimal_macros = "1.26"
ion-rs = "0.18"
ordered-float = "4"
itertools = "0.13"
unicase = "2.7"
rust_decimal = { version = "1.36.0", default-features = false, features = ["std"] }
rust_decimal_macros = "1.36"
ion-rs_old = { version = "0.18", package = "ion-rs" }
ion-rs = { version = "1.0.0-rc.7", features = ["experimental"] }
time = { version = "0.3", features = ["macros"] }
once_cell = "1"
regex = "1.7"
regex = "1.10"
thiserror = "1.0"
delegate = "0.9"
delegate = "0.13"

[dev-dependencies]
criterion = "0.4"
criterion = "0.5"

[features]
default = []
2 changes: 1 addition & 1 deletion extension/partiql-extension-ion/src/decode.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use delegate::delegate;
use ion_rs::{Decimal, Int, IonError, IonReader, IonType, StreamItem, Symbol};
use ion_rs_old::{Decimal, Int, IonError, IonReader, IonType, StreamItem, Symbol};
use once_cell::sync::Lazy;
use partiql_value::{Bag, DateTime, List, Tuple, Value};
use regex::RegexSet;
Expand Down
10 changes: 5 additions & 5 deletions extension/partiql-extension-ion/src/encode.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use delegate::delegate;

use ion_rs::{IonError, IonType, IonWriter};
use ion_rs_old::{IonError, IonType, IonWriter};
use ordered_float::OrderedFloat;
use partiql_value::{Bag, DateTime, List, Tuple, Value};
use rust_decimal::Decimal;
Expand Down Expand Up @@ -218,7 +218,7 @@ where
fn encode_decimal(&mut self, val: &Decimal) -> IonEncodeResult {
let scale = i64::from(val.scale());
let mantissa = val.mantissa();
let dec = ion_rs::Decimal::new(mantissa, -scale);
let dec = ion_rs_old::Decimal::new(mantissa, -scale);
Ok(self.writer.write_decimal(&dec)?)
}

Expand All @@ -233,7 +233,7 @@ where
fn encode_datetime(&mut self, val: &DateTime) -> IonEncodeResult {
match val {
DateTime::Timestamp(ts) => {
let ts = ion_rs::Timestamp::with_ymd(
let ts = ion_rs_old::Timestamp::with_ymd(
ts.year() as u32,
ts.month() as u32,
u32::from(ts.day()),
Expand All @@ -249,7 +249,7 @@ where
Ok(self.writer.write_timestamp(&ts)?)
}
DateTime::TimestampWithTz(ts) => {
let ts = ion_rs::Timestamp::with_ymd(
let ts = ion_rs_old::Timestamp::with_ymd(
ts.year() as u32,
ts.month() as u32,
u32::from(ts.day()),
Expand Down Expand Up @@ -334,7 +334,7 @@ where
self.inner
.writer
.set_annotations(std::iter::once(DATE_ANNOT));
let ts = ion_rs::Timestamp::with_ymd(
let ts = ion_rs_old::Timestamp::with_ymd(
date.year() as u32,
date.month() as u32,
u32::from(date.day()),
Expand Down
Loading

0 comments on commit 8098cea

Please sign in to comment.