Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable, 1.84.0]
rust: [stable, 1.85.0]
steps:
- name: Install Rust
uses: hecrj/setup-rust-action@v1
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ file is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Requires Rust 1.85 or newer.

## [0.16.0] - 2025-10-06

### Changed
Expand Down Expand Up @@ -193,6 +199,7 @@ Versioning](https://semver.org/spec/v2.0.0.html).
column-oriented form.
- Interface to read CSV data into `Table`.

[Unreleased]: https://github.com/petabi/structured/compare/0.16.0...main
[0.16.0]: https://github.com/petabi/structured/compare/0.15.0...0.16.0
[0.15.0]: https://github.com/petabi/structured/compare/0.14.1...0.15.0
[0.14.1]: https://github.com/petabi/structured/compare/0.14.0...0.14.1
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ authors = [
"Min Shao <min.shao1988@gmail.com>",
"Sehkone Kim <sehkone@petabi.com>",
]
edition = "2021"
rust-version = "1.84"
edition = "2024"
rust-version = "1.85"
description = "Data structures to handle large, structured data."
homepage = "https://github.com/petabi/structured"
repository = "https://github.com/petabi/structured"
Expand Down
2 changes: 1 addition & 1 deletion src/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pub(crate) mod reader;

pub use reader::infer_schema;
pub use reader::Config;
pub use reader::FieldParser;
pub use reader::infer_schema;
pub use reader::{Reader, Record};
16 changes: 9 additions & 7 deletions src/csv/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ mod tests {

use arrow::array::{Array, BinaryArray, StringArray};
use itertools::izip;
use jiff::civil::{date, DateTime};
use serde_test::{assert_tokens, Token};
use jiff::civil::{DateTime, date};
use serde_test::{Token, assert_tokens};

use super::*;
use crate::table::Column;
Expand Down Expand Up @@ -602,11 +602,13 @@ mod tests {
Field::new("", DataType::Utf8, false),
];

assert!(schema
.fields()
.into_iter()
.zip(answers.into_iter())
.all(|(a, b)| a.data_type() == b.data_type()));
assert!(
schema
.fields()
.into_iter()
.zip(answers.into_iter())
.all(|(a, b)| a.data_type() == b.data_type())
);
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ where
for (k, v) in &count {
top_n.push(((*k).clone(), *v));
}
top_n.sort_unstable_by(|a, b| b.1.cmp(&a.1));
top_n.sort_unstable_by_key(|a| std::cmp::Reverse(a.1));
top_n
}

Expand All @@ -589,7 +589,7 @@ where
.into_iter()
.collect();

freqs.sort_unstable_by(|a, b| b.1.cmp(&a.1));
freqs.sort_unstable_by_key(|a| std::cmp::Reverse(a.1));

(
freqs.len(),
Expand Down
12 changes: 6 additions & 6 deletions src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ use std::sync::Arc;
use std::vec;

use arrow::array::{
Array, BinaryArray, Float32Array, Float64Array, Int16Array, Int32Array, Int64Array, Int8Array,
PrimitiveArray, PrimitiveBuilder, StringArray, UInt16Array, UInt32Array, UInt64Array,
UInt8Array,
Array, BinaryArray, Float32Array, Float64Array, Int8Array, Int16Array, Int32Array, Int64Array,
PrimitiveArray, PrimitiveBuilder, StringArray, UInt8Array, UInt16Array, UInt32Array,
UInt64Array,
};
use arrow::datatypes::{ArrowPrimitiveType, DataType, Int64Type, Schema, TimeUnit};
use num_traits::ToPrimitive;
use serde::{Deserialize, Serialize};
use strum_macros::EnumString;

use crate::stats::{
convert_time_intervals, describe, n_largest_count, n_largest_count_datetime,
n_largest_count_enum, n_largest_count_float64, ColumnStatistics, GroupCount, GroupElement,
GroupElementCount,
ColumnStatistics, GroupCount, GroupElement, GroupElementCount, convert_time_intervals,
describe, n_largest_count, n_largest_count_datetime, n_largest_count_enum,
n_largest_count_float64,
};

type ReverseEnumMaps = HashMap<usize, HashMap<u64, Vec<String>>>;
Expand Down
Loading