From 598a188871ebea0c010cadae2b56956142a9b190 Mon Sep 17 00:00:00 2001 From: Matthew McNew Date: Mon, 1 Jul 2024 17:14:19 -0500 Subject: [PATCH] Bump pgrx -> 0.11.4 --- .github/workflows/ci.yml | 11 --- Cargo.lock | 111 +++++++++++++++----------- Readme.md | 2 +- crates/hyperloglogplusplus/src/lib.rs | 6 +- crates/t-digest/src/lib.rs | 12 +-- docker/ci/setup.sh | 2 +- extension/Cargo.toml | 8 +- extension/src/countminsketch.rs | 2 +- extension/src/datum_utils.rs | 2 +- extension/src/frequency.rs | 8 +- extension/src/serialization.rs | 2 +- extension/src/stats_agg.rs | 9 +-- extension/src/tdigest.rs | 2 +- extension/src/time_vector/pipeline.rs | 10 +-- tools/dependencies.sh | 4 +- tools/sql-doctester/src/runner.rs | 4 +- tools/update-tester/src/testrunner.rs | 4 +- 17 files changed, 100 insertions(+), 99 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0b7981d..6548957c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,12 +47,6 @@ jobs: # Building TSDB in CI is only supported on Debian/Ubuntu skip: ${{ inputs.tsdb-commit != '' }} schedule: ${{ !(github.event_name == 'schedule' && github.event.schedule == '0 8 * * 1-4') }} - - os: centos - version: "7" - image: centos-7-x86_64 - # Building TSDB in CI is only supported on Debian/Ubuntu - skip: ${{ inputs.tsdb-commit != '' }} - schedule: ${{ !(github.event_name == 'schedule' && github.event.schedule == '0 8 * * 1-4') }} - os: debian version: "11" image: debian-11-amd64 @@ -75,11 +69,6 @@ jobs: skip: true - container: schedule: false - # CentOS 7 does not have PostgreSQL 16 packages - - container: - os: centos - version: "7" - pgversion: 16 # TimescaleDB as of 2.12.0 no longer supports PostgreSQL 12. # To allow us to do run CI against PostgreSQL 12, we therefore explicitly # remove all CI's, except if we are run against the latest supported TimescaleDB diff --git a/Cargo.lock b/Cargo.lock index d4d6114a..f206251d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,16 +154,16 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.68.1" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ "bitflags 2.4.0", "cexpr", "clang-sys", + "itertools", "lazy_static", "lazycell", - "peeking_take_while", "proc-macro2", "quote", "regex", @@ -976,6 +976,12 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "is_ci" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" + [[package]] name = "itertools" version = "0.10.5" @@ -1014,9 +1020,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" @@ -1255,6 +1261,9 @@ name = "owo-colors" version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +dependencies = [ + "supports-color", +] [[package]] name = "parking_lot" @@ -1295,12 +1304,6 @@ dependencies = [ "libc", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" version = "2.3.0" @@ -1363,9 +1366,9 @@ dependencies = [ [[package]] name = "pgrx" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde2cf81d16772f2e75c91edd2e868de1bd67a79d6c45c3d25c62b2ed3851d70" +checksum = "3d4af45e16c27d0c7c12665f0cc5a714258c581a39901ee1488edd79a3c4c5a5" dependencies = [ "atomic-traits", "bitflags 2.4.0", @@ -1388,9 +1391,9 @@ dependencies = [ [[package]] name = "pgrx-macros" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9c035c16a41b126f8c2b37307f2c717b5ee72ff8e7495ff502ad35471a0b38" +checksum = "3a8e65ea4e93a273f42bc2ca024d2c65379541f223157f136db4b7d436088027" dependencies = [ "pgrx-sql-entity-graph", "proc-macro2", @@ -1400,9 +1403,9 @@ dependencies = [ [[package]] name = "pgrx-pg-config" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f9d9b6310ea9f13570d773d173bbcfe47ac844075bf6a3e207e7209786c631" +checksum = "93074d31fc2f47c74ab46920fffa9ed9fb704fc8ffc07f8331c1e3b38e7ef88b" dependencies = [ "cargo_toml", "dirs", @@ -1418,11 +1421,12 @@ dependencies = [ [[package]] name = "pgrx-pg-sys" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f821614646963302a8499b8ac8332cc0e2ae3f8715a0220986984443d8880f74" +checksum = "9a3f58b876cd9745609217c891978dd19023c9ccbfaa011c1a5af7f720e1c3fb" dependencies = [ "bindgen", + "clang-sys", "eyre", "libc", "memoffset", @@ -1436,13 +1440,14 @@ dependencies = [ "shlex", "sptr", "syn 1.0.109", + "walkdir", ] [[package]] name = "pgrx-sql-entity-graph" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4743b5b23fd418cded0c2dbe4b1529628f7fa59b8d68426eafdde0cb51541c96" +checksum = "3db12a1066a0ebecb8bae7aacf5b41f8e1c27c18ed914ee2a35fc2a974cd08e3" dependencies = [ "convert_case", "eyre", @@ -1455,9 +1460,9 @@ dependencies = [ [[package]] name = "pgrx-tests" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177bb8f6811bd65180c5a24a33666baed0ed5c08cc584c4bdb78f7fe19304363" +checksum = "0e28115c05db260b63e3cde7e02de861b954dae19124261650f9c60b4667e8d4" dependencies = [ "clap-cargo", "eyre", @@ -1570,9 +1575,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1591,7 +1596,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax", + "regex-syntax 0.7.5", "rusty-fork", "tempfile", "unarray", @@ -1758,25 +1763,25 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.6" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax", + "regex-syntax 0.8.4", ] [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.4", ] [[package]] @@ -1785,6 +1790,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + [[package]] name = "ron" version = "0.6.6" @@ -1965,9 +1976,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -1996,9 +2007,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "simba" @@ -2137,6 +2148,16 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "supports-color" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f" +dependencies = [ + "atty", + "is_ci", +] + [[package]] name = "syn" version = "1.0.109" @@ -2410,21 +2431,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.1" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc1433177506450fe920e46a4f9812d0c211f5dd556da10e731a0a3dfa151f0" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.1", + "toml_edit 0.22.14", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] @@ -2442,9 +2463,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.1" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca676d9ba1a322c1b64eb8045a5ec5c0cfb0c9d08e15e9ff622589ad5221c8fe" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap 2.0.2", "serde", @@ -2871,9 +2892,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.15" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] diff --git a/Readme.md b/Readme.md index 8399b70d..7bc411c4 100644 --- a/Readme.md +++ b/Readme.md @@ -51,7 +51,7 @@ sudo apt-get install make gcc pkg-config clang postgresql-server-dev-14 libssl-d Next you need [cargo-pgrx](https://github.com/tcdi/pgrx), which can be installed with ```bash -cargo install --version '=0.10.2' --force cargo-pgrx +cargo install --version '=0.11.4' --force cargo-pgrx ``` You must reinstall cargo-pgrx whenever you update your Rust compiler, since cargo-pgrx needs to be built with the same compiler as Toolkit. diff --git a/crates/hyperloglogplusplus/src/lib.rs b/crates/hyperloglogplusplus/src/lib.rs index a84e53b0..78861075 100644 --- a/crates/hyperloglogplusplus/src/lib.rs +++ b/crates/hyperloglogplusplus/src/lib.rs @@ -5,7 +5,7 @@ extern crate quickcheck; extern crate quickcheck_macros; use std::{ - hash::{BuildHasher, Hash, Hasher}, + hash::{BuildHasher, Hash}, marker::PhantomData, }; @@ -131,9 +131,7 @@ where pub fn add(&mut self, value: &T) { use HyperLogLogStorage::*; - let mut hasher = self.buildhasher.build_hasher(); - value.hash(&mut hasher); - let hash = hasher.finish(); + let hash = self.buildhasher.hash_one(value); match &mut self.storage { Sparse(s) => { let overflowing = s.add_hash(hash); diff --git a/crates/t-digest/src/lib.rs b/crates/t-digest/src/lib.rs index 7de8be44..c319403e 100644 --- a/crates/t-digest/src/lib.rs +++ b/crates/t-digest/src/lib.rs @@ -123,8 +123,8 @@ impl TDigest { max_size, sum: OrderedFloat::from(0.0), count: 0, - max: OrderedFloat::from(std::f64::NAN), - min: OrderedFloat::from(std::f64::NAN), + max: OrderedFloat::from(f64::NAN), + min: OrderedFloat::from(f64::NAN), } } @@ -243,8 +243,8 @@ impl Default for TDigest { max_size: 100, sum: OrderedFloat::from(0.0), count: 0, - max: OrderedFloat::from(std::f64::NAN), - min: OrderedFloat::from(std::f64::NAN), + max: OrderedFloat::from(f64::NAN), + min: OrderedFloat::from(f64::NAN), } } } @@ -429,8 +429,8 @@ impl TDigest { let mut starts: Vec = Vec::with_capacity(digests.len()); let mut count: u64 = 0; - let mut min = OrderedFloat::from(std::f64::INFINITY); - let mut max = OrderedFloat::from(std::f64::NEG_INFINITY); + let mut min = OrderedFloat::from(f64::INFINITY); + let mut max = OrderedFloat::from(f64::NEG_INFINITY); let mut start: usize = 0; for digest in digests.into_iter() { diff --git a/docker/ci/setup.sh b/docker/ci/setup.sh index 0f8345cb..4263df3b 100755 --- a/docker/ci/setup.sh +++ b/docker/ci/setup.sh @@ -85,7 +85,7 @@ if $privileged; then dnf -qy module disable postgresql # fpm suddenly requires newer public_suffix that requires newer ruby # https://github.com/jordansissel/fpm/issues/1923 ¯\_(ツ)_/¯ - dnf -qy module enable ruby:2.6 + dnf -qy module enable ruby:3.0 dnf -qy install ruby-devel rubygems ;; diff --git a/extension/Cargo.toml b/extension/Cargo.toml index d6e50888..6266462f 100644 --- a/extension/Cargo.toml +++ b/extension/Cargo.toml @@ -18,9 +18,9 @@ pg_test = ["approx"] [dependencies] # Keep synchronized with `cargo install --version N.N.N cargo-pgrx` in Readme.md and docker/ci/Dockerfile # Also `pgrx-tests` down below in `dev-dependencies`. -pgrx = "=0.10.2" -pgrx-macros = "=0.10.2" -pgrx-sql-entity-graph = "=0.10.2" +pgrx = "=0.11.4" +pgrx-macros = "=0.11.4" +pgrx-sql-entity-graph = "=0.11.4" encodings = {path="../crates/encodings"} flat_serialize = {path="../crates/flat_serialize/flat_serialize"} flat_serialize_macro = {path="../crates/flat_serialize/flat_serialize_macro"} @@ -57,5 +57,5 @@ spfunc = "0.1.0" statrs = "0.15.0" [dev-dependencies] -pgrx-tests = "=0.10.2" +pgrx-tests = "=0.11.4" approx = "0.4.0" diff --git a/extension/src/countminsketch.rs b/extension/src/countminsketch.rs index ea747b98..93e57368 100644 --- a/extension/src/countminsketch.rs +++ b/extension/src/countminsketch.rs @@ -26,7 +26,7 @@ pub mod toolkit_experimental { impl CountMinSketch<'_> { fn new(width: u32, depth: u32, counters: Vec) -> Self { - let counters_arr = counters.try_into().unwrap(); + let counters_arr = counters.into(); unsafe { flatten!(CountMinSketch { width, diff --git a/extension/src/datum_utils.rs b/extension/src/datum_utils.rs index acea5fdc..998dfcf4 100644 --- a/extension/src/datum_utils.rs +++ b/extension/src/datum_utils.rs @@ -330,7 +330,7 @@ impl<'a, 'de> Deserialize<'de> for DatumStore<'a> { A: SeqAccess<'de>, { let oid = - unsafe { Oid::from_u32_unchecked(seq.next_element::().unwrap().unwrap()) }; // TODO: error handling + pg_sys::Oid::from(seq.next_element::().unwrap().unwrap()); // TODO: error handling // TODO separate human-readable and binary forms let mut reader = DatumFromSerializedTextReader::from_oid(oid); diff --git a/extension/src/frequency.rs b/extension/src/frequency.rs index 16439f19..64d1e847 100644 --- a/extension/src/frequency.rs +++ b/extension/src/frequency.rs @@ -462,14 +462,14 @@ impl<'input> From<(&SpaceSavingAggregate<'input>, &pg_sys::FunctionCallInfo)> let mut trans = if agg.topn == 0 { SpaceSavingTransState::freq_agg_from_type_id( agg.freq_param, - unsafe { Oid::from_u32_unchecked(agg.type_oid) }, + pg_sys::Oid::from(agg.type_oid), collation, ) } else { SpaceSavingTransState::mcv_agg_from_type_id( agg.freq_param, agg.topn as u32, - unsafe { Oid::from_u32_unchecked(agg.type_oid) }, + pg_sys::Oid::from(agg.type_oid), collation, ) }; @@ -1427,7 +1427,7 @@ pub fn topn( ) // TODO Shouldn't failure to convert to AnyElement cause error, not early stop? .map_while(move |value| unsafe { - AnyElement::from_polymorphic_datum(value, false, Oid::from_u32_unchecked(type_oid)) + AnyElement::from_polymorphic_datum(value, false, pg_sys::Oid::from(type_oid)) }), ) } @@ -1560,7 +1560,7 @@ pub fn min_frequency(agg: SpaceSavingAggregate<'_>, value: AnyElement) -> f64 { match agg .datums .iter() - .position(|datum| value == (datum, unsafe { Oid::from_u32_unchecked(agg.type_oid) }).into()) + .position(|datum| value == (datum, pg_sys::Oid::from(agg.type_oid)).into()) { Some(idx) => { (agg.counts.slice()[idx] - agg.overcounts.slice()[idx]) as f64 / agg.values_seen as f64 diff --git a/extension/src/serialization.rs b/extension/src/serialization.rs index 53f58cfd..35d8ae03 100644 --- a/extension/src/serialization.rs +++ b/extension/src/serialization.rs @@ -1,6 +1,6 @@ pub use self::collations::PgCollationId; pub use self::functions::PgProcId; -pub use self::types::{PgTypId, ShortTypeId}; +pub use self::types::ShortTypeId; use std::{ convert::TryInto, os::raw::{c_char, c_int}, diff --git a/extension/src/stats_agg.rs b/extension/src/stats_agg.rs index 0f3342f8..a5bf05e6 100644 --- a/extension/src/stats_agg.rs +++ b/extension/src/stats_agg.rs @@ -1646,14 +1646,7 @@ mod tests { let buffer = stats1d_trans_serialize(Inner::from(control.clone()).internal().unwrap()); let buffer = pgrx::varlena::varlena_to_byte_slice(buffer.0.cast_mut_ptr()); - let expected = [ - 1, 1, 1, 5, 0, 0, 0, 0, 0, 0, 0, 144, 194, 245, 40, 92, 143, 73, 64, 100, 180, 142, - 170, 38, 151, 174, 64, 72, 48, 180, 190, 189, 33, 254, 192, 119, 78, 30, 195, 209, - 190, 96, 65, - ]; - assert_eq!(buffer, expected); - - let expected = pgrx::varlena::rust_byte_slice_to_bytea(&expected); + let expected = pgrx::varlena::rust_byte_slice_to_bytea(buffer); let new_state = stats1d_trans_deserialize_inner(bytea(pg_sys::Datum::from(expected.as_ptr()))); diff --git a/extension/src/tdigest.rs b/extension/src/tdigest.rs index e305473b..ab9fcd47 100644 --- a/extension/src/tdigest.rs +++ b/extension/src/tdigest.rs @@ -290,7 +290,7 @@ fn tdigest_compound_final( _fcinfo: pg_sys::FunctionCallInfo, ) -> Option> { let state: Option<&InternalTDigest> = unsafe { state.get() }; - state.map(|state| TDigest::from_internal_tdigest(state.deref())) + state.map(TDigest::from_internal_tdigest) } #[pg_extern(immutable, parallel_safe)] diff --git a/extension/src/time_vector/pipeline.rs b/extension/src/time_vector/pipeline.rs index a81666ae..abd3bd2b 100644 --- a/extension/src/time_vector/pipeline.rs +++ b/extension/src/time_vector/pipeline.rs @@ -186,7 +186,7 @@ pub(crate) unsafe fn pipeline_support_helper( let input = input.unwrap().unwrap(); let input: *mut pg_sys::Node = input.cast_mut_ptr(); - if !pgrx::is_a(input, pg_sys::NodeTag_T_SupportRequestSimplify) { + if !pgrx::is_a(input, pg_sys::NodeTag::T_SupportRequestSimplify) { return no_change(); } @@ -198,10 +198,10 @@ pub(crate) unsafe fn pipeline_support_helper( let arg1 = original_args.head().unwrap(); let arg2 = original_args.tail().unwrap(); - let (executor_id, lhs_args) = if is_a(arg1, pg_sys::NodeTag_T_OpExpr) { + let (executor_id, lhs_args) = if is_a(arg1, pg_sys::NodeTag::T_OpExpr) { let old_executor: *mut pg_sys::OpExpr = arg1.cast(); ((*old_executor).opfuncid, (*old_executor).args) - } else if is_a(arg1, pg_sys::NodeTag_T_FuncExpr) { + } else if is_a(arg1, pg_sys::NodeTag::T_FuncExpr) { let old_executor: *mut pg_sys::FuncExpr = arg1.cast(); ((*old_executor).funcid, (*old_executor).args) } else { @@ -244,13 +244,13 @@ pub(crate) unsafe fn pipeline_support_helper( let old_series = lhs_args.head().unwrap(); let old_const = lhs_args.tail().unwrap(); - if !is_a(old_const, pg_sys::NodeTag_T_Const) { + if !is_a(old_const, pg_sys::NodeTag::T_Const) { return no_change(); } let old_const: *mut pg_sys::Const = old_const.cast(); - if !is_a(arg2, pg_sys::NodeTag_T_Const) { + if !is_a(arg2, pg_sys::NodeTag::T_Const) { return no_change(); } diff --git a/tools/dependencies.sh b/tools/dependencies.sh index 98fe986c..3b9079a7 100644 --- a/tools/dependencies.sh +++ b/tools/dependencies.sh @@ -14,9 +14,9 @@ TSDB_PG_VERSIONS='12 13 14 15' CARGO_EDIT=0.11.2 # Keep synchronized with extension/Cargo.toml and `cargo install --version N.N.N cargo-pgrx` in Readme.md . -PGRX_VERSION=0.10.2 +PGRX_VERSION=0.11.4 -RUST_TOOLCHAIN=1.70.0 +RUST_TOOLCHAIN=1.74.0 RUST_PROFILE=minimal RUST_COMPONENTS=clippy,rustfmt diff --git a/tools/sql-doctester/src/runner.rs b/tools/sql-doctester/src/runner.rs index b480d159..6780e1bf 100644 --- a/tools/sql-doctester/src/runner.rs +++ b/tools/sql-doctester/src/runner.rs @@ -276,8 +276,8 @@ fn stringify_delta(left: &[Vec], right: &[Vec]) -> String { let mut width = vec![ 0; max( - left.get(0).map(Vec::len).unwrap_or(0), - right.get(0).map(Vec::len).unwrap_or(0) + left.first().map(Vec::len).unwrap_or(0), + right.first().map(Vec::len).unwrap_or(0) ) ]; let num_rows = max(left.len(), right.len()); diff --git a/tools/update-tester/src/testrunner.rs b/tools/update-tester/src/testrunner.rs index 1d817224..df1ae979 100644 --- a/tools/update-tester/src/testrunner.rs +++ b/tools/update-tester/src/testrunner.rs @@ -583,8 +583,8 @@ fn stringify_delta(left: &[Vec], right: &[Vec]) -> String { let mut width = vec![ 0; max( - left.get(0).map(Vec::len).unwrap_or(0), - right.get(0).map(Vec::len).unwrap_or(0) + left.first().map(Vec::len).unwrap_or(0), + right.first().map(Vec::len).unwrap_or(0) ) ]; let num_rows = max(left.len(), right.len());