Skip to content

Commit

Permalink
Merge pull request #21 from constellation-rs/list
Browse files Browse the repository at this point in the history
Vec -> List to optimize List<u8>
  • Loading branch information
mergify[bot] authored Dec 12, 2019
2 parents 3f404db + e450233 commit 7b8b121
Show file tree
Hide file tree
Showing 30 changed files with 908 additions and 305 deletions.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[package]
name = "amadeus"
version = "0.1.4"
version = "0.1.5"
license = "Apache-2.0"
authors = ["Alec Mocatta <[email protected]>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -14,7 +14,7 @@ parquet postgres aws s3 cloudfront elb json csv logs hadoop hdfs arrow common cr
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.1.4"
documentation = "https://docs.rs/amadeus/0.1.5"
readme = "README.md"
edition = "2018"

Expand All @@ -37,14 +37,14 @@ doc = ["amadeus-aws/doc", "amadeus-commoncrawl/doc", "amadeus-postgres/doc", "am
features = ["doc", "constellation", "aws", "commoncrawl", "postgres", "csv", "json"]

[dependencies]
amadeus-core = { version = "=0.1.4", path = "amadeus-core" }
amadeus-derive = { version = "=0.1.4", path = "amadeus-derive" }
amadeus-types = { version = "=0.1.4", path = "amadeus-types" }
amadeus-aws = { version = "=0.1.4", path = "amadeus-aws", optional = true }
amadeus-commoncrawl = { version = "=0.1.4", path = "amadeus-commoncrawl", optional = true }
amadeus-parquet = { version = "=0.1.4", path = "amadeus-parquet", optional = true }
amadeus-postgres = { version = "=0.1.4", path = "amadeus-postgres", optional = true }
amadeus-serde = { version = "=0.1.4", path = "amadeus-serde", optional = true }
amadeus-core = { version = "=0.1.5", path = "amadeus-core" }
amadeus-derive = { version = "=0.1.5", path = "amadeus-derive" }
amadeus-types = { version = "=0.1.5", path = "amadeus-types" }
amadeus-aws = { version = "=0.1.5", path = "amadeus-aws", optional = true }
amadeus-commoncrawl = { version = "=0.1.5", path = "amadeus-commoncrawl", optional = true }
amadeus-parquet = { version = "=0.1.5", path = "amadeus-parquet", optional = true }
amadeus-postgres = { version = "=0.1.5", path = "amadeus-postgres", optional = true }
amadeus-serde = { version = "=0.1.5", path = "amadeus-serde", optional = true }
constellation-rs = { version = "0.1", default-features = false, optional = true }
futures = "0.3"
serde = { version = "1.0", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</p>

<p align="center">
<a href="https://docs.rs/amadeus/0.1.4">📖 Docs</a> | <a href="https://constellation.rs/amadeus">🌐 Home</a> | <a href="https://constellation.zulipchat.com/#narrow/stream/213231-amadeus">💬 Chat</a>
<a href="https://docs.rs/amadeus/0.1.5">📖 Docs</a> | <a href="https://constellation.rs/amadeus">🌐 Home</a> | <a href="https://constellation.zulipchat.com/#narrow/stream/213231-amadeus">💬 Chat</a>
</p>

## Amadeus provides:
Expand Down Expand Up @@ -50,7 +50,7 @@ We aim to create a community that is welcoming and helpful to anyone that is int

Amadeus has deep, pluggable, integration with various file formats, databases and interfaces:

| Data format | [`Source`](https://docs.rs/amadeus/0.1.4/amadeus/trait.Source.html) | [`Sink`](https://docs.rs/amadeus/0.1.4/amadeus/trait.Sink.html) |
| Data format | [`Source`](https://docs.rs/amadeus/0.1.5/amadeus/trait.Source.html) | [`Sink`](https://docs.rs/amadeus/0.1.5/amadeus/trait.Sink.html) |
|---|---|---|
| CSV |||
| JSON |||
Expand Down
10 changes: 5 additions & 5 deletions amadeus-aws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-aws"
version = "0.1.4"
version = "0.1.5"
license = "Apache-2.0"
authors = ["Alec Mocatta <[email protected]>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,7 +10,7 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.1.4"
documentation = "https://docs.rs/amadeus/0.1.5"
readme = "README.md"
edition = "2018"

Expand All @@ -22,12 +22,12 @@ maintenance = { status = "actively-developed" }
doc = []

[dependencies]
amadeus-core = { version = "=0.1.4", path = "../amadeus-core" }
amadeus-types = { version = "=0.1.4", path = "../amadeus-types" }
amadeus-core = { version = "=0.1.5", path = "../amadeus-core" }
amadeus-types = { version = "=0.1.5", path = "../amadeus-types" }
chrono = { version = "0.4", default-features = false }
flate2 = "1.0"
futures-01 = { package = "futures", version = "0.1" }
futures-preview = { version = "=0.3.0-alpha.19", features = ["compat"] }
futures = { version = "0.3", features = ["compat"] }
http = "0.2"
once_cell = "1.0"
rusoto_core = "0.42"
Expand Down
2 changes: 1 addition & 1 deletion amadeus-aws/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/amadeus-aws/0.1.4")]
#![doc(html_root_url = "https://docs.rs/amadeus-aws/0.1.5")]
#![feature(type_alias_impl_trait)]

mod cloudfront;
Expand Down
8 changes: 4 additions & 4 deletions amadeus-commoncrawl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-commoncrawl"
version = "0.1.4"
version = "0.1.5"
license = "MIT OR Apache-2.0"
authors = ["Stephen Becker IV <[email protected]>", "Alec Mocatta <[email protected]>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,7 +10,7 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.1.4"
documentation = "https://docs.rs/amadeus/0.1.5"
readme = "README.md"
edition = "2018"

Expand All @@ -22,8 +22,8 @@ maintenance = { status = "actively-developed" }
doc = []

[dependencies]
amadeus-core = { version = "=0.1.4", path = "../amadeus-core" }
amadeus-types = { version = "=0.1.4", path = "../amadeus-types" }
amadeus-core = { version = "=0.1.5", path = "../amadeus-core" }
amadeus-types = { version = "=0.1.5", path = "../amadeus-types" }
flate2 = "1.0"
reqwest = "0.9"
reqwest_resume = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion amadeus-commoncrawl/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/amadeus-commoncrawl/0.1.4")]
#![doc(html_root_url = "https://docs.rs/amadeus-commoncrawl/0.1.5")]
#![feature(type_alias_impl_trait)]

mod commoncrawl;
Expand Down
6 changes: 3 additions & 3 deletions amadeus-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-core"
version = "0.1.4"
version = "0.1.5"
license = "Apache-2.0"
authors = ["Alec Mocatta <[email protected]>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,7 +10,7 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.1.4"
documentation = "https://docs.rs/amadeus/0.1.5"
readme = "README.md"
edition = "2018"

Expand All @@ -20,7 +20,7 @@ maintenance = { status = "actively-developed" }

[dependencies]
either = { version = "1.5", features = ["serde"] }
futures-preview = "=0.3.0-alpha.19"
futures = "0.3"
owned_chars = "0.3"
rand = "0.7"
replace_with = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion amadeus-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/amadeus-core/0.1.4")]
#![doc(html_root_url = "https://docs.rs/amadeus-core/0.1.5")]
#![feature(atomic_min_max)]
#![feature(specialization)]
#![feature(read_initializer)]
Expand Down
4 changes: 2 additions & 2 deletions amadeus-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-derive"
version = "0.1.4"
version = "0.1.5"
license = "Apache-2.0"
authors = ["Alec Mocatta <[email protected]>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,7 +10,7 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.1.4"
documentation = "https://docs.rs/amadeus/0.1.5"
readme = "README.md"
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion amadeus-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#![doc(html_root_url = "https://docs.rs/amadeus-derive/0.1.4")]
#![doc(html_root_url = "https://docs.rs/amadeus-derive/0.1.5")]
#![recursion_limit = "400"]
#![allow(clippy::useless_let_if_seq)]

Expand Down
8 changes: 4 additions & 4 deletions amadeus-parquet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-parquet"
version = "0.1.4"
version = "0.1.5"
license = "Apache-2.0"
authors = ["Alec Mocatta <[email protected]>", "Apache Arrow <[email protected]>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,7 +10,7 @@ An Apache Parquet implementation in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.1.4"
documentation = "https://docs.rs/amadeus/0.1.5"
readme = "README.md"
edition = "2018"

Expand All @@ -22,8 +22,8 @@ maintenance = { status = "actively-developed" }
doc = []

[dependencies]
amadeus-core = { version = "=0.1.4", path = "../amadeus-core" }
amadeus-types = { version = "=0.1.4", path = "../amadeus-types" }
amadeus-core = { version = "=0.1.5", path = "../amadeus-core" }
amadeus-types = { version = "=0.1.5", path = "../amadeus-types" }
brotli = "3.3"
byteorder = "1.2"
chrono = { version = "0.4", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions amadeus-parquet/src/internal/file/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ mod tests {
use std::collections::HashMap;
use test::Bencher;

use amadeus_types::{DateTime, Group};
use amadeus_types::{DateTime, Group, List};

use super::*;
use crate::internal::{
Expand Down Expand Up @@ -1120,7 +1120,7 @@ mod tests {

bench.bytes = len;
bench.iter(|| {
type RowTyped = (Vec<u8>, i32, i64, bool, f32, f64, Vec<u8>, DateTime); // [u8; 1024]
type RowTyped = (List<u8>, i32, i64, bool, f32, f64, List<u8>, DateTime); // [u8; 1024]
(&parquet_reader)
.get_row_iter::<RowTyped>(None)
.unwrap()
Expand Down
8 changes: 4 additions & 4 deletions amadeus-parquet/src/internal/record/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use sum::{Sum2, Sum3};

use amadeus_core::util::type_coerce;
use amadeus_types::{
Bson, Date, DateTime, DateTimeWithoutTimezone, DateWithoutTimezone, Decimal, Enum, Group, IpAddr, Json, Time, TimeWithoutTimezone, Timezone, Url, Value, Webpage
Bson, Date, DateTime, DateTimeWithoutTimezone, DateWithoutTimezone, Decimal, Enum, Group, IpAddr, Json, List, Time, TimeWithoutTimezone, Timezone, Url, Value, Webpage
};

#[cfg(debug_assertions)]
Expand Down Expand Up @@ -467,7 +467,7 @@ pub(super) fn parse_list<T: ParquetData>(schema: &Type) -> Result<ListSchema<T::
Err(ParquetError::General(String::from("Couldn't parse Vec<T>")))
}

impl<T> ParquetData for Vec<T>
impl<T> ParquetData for List<T>
where
T: ParquetData,
{
Expand Down Expand Up @@ -576,7 +576,7 @@ fn byte_array_reader(
}
}

impl ParquetData for Vec<u8> {
impl ParquetData for List<u8> {
type Schema = VecU8Schema;
type Reader = VecU8Reader;

Expand Down Expand Up @@ -1913,7 +1913,7 @@ impl ParquetData for Value {
schema, path, def_level, rep_level, paths, batch_size,
)),
ValueSchema::List(ref schema) => {
ValueReader::List(Box::new(<Vec<Value> as ParquetData>::reader(
ValueReader::List(Box::new(<List<Value> as ParquetData>::reader(
type_coerce(&**schema),
path,
def_level,
Expand Down
Loading

0 comments on commit 7b8b121

Please sign in to comment.