From b435b8a0a3147b9b8d851629a2b49bd663ebc704 Mon Sep 17 00:00:00 2001 From: Ben Chambers <35960+bjchambers@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:42:11 -0700 Subject: [PATCH] feat: Connect Python builder to Rust This creates DFG nodes and checks their types. Some extra features: - Uses the pyarrow types of the expression to limit some overloads. In the case of `__getattr__` this prevents mistakes leading easily to infinite recursion. In the case of `expr[expr]` this lets us use the correct methods. - Allows using python literals (`str`, `int` and `float`) as arguments to expressions. - Renames `ffi` module to `_ffi` to indicate it is private. - Add some tests fro error cases --- crates/sparrow-compiler/src/ast_to_dfg.rs | 12 +- .../src/ast_to_dfg/ast_dfg.rs | 32 +- .../src/ast_to_dfg/record_ops_to_dfg.rs | 8 +- crates/sparrow-compiler/src/data_context.rs | 3 +- crates/sparrow-compiler/src/dfg.rs | 12 +- .../src/diagnostics/collector.rs | 10 +- crates/sparrow-compiler/src/frontend.rs | 6 +- .../src/functions/function.rs | 4 +- crates/sparrow-compiler/src/query_builder.rs | 22 +- sparrow-py/Cargo.lock | 3514 +++++++++++++++-- sparrow-py/Cargo.toml | 7 +- sparrow-py/mypy.ini | 8 + sparrow-py/noxfile.py | 6 +- sparrow-py/pyproject.toml | 3 +- sparrow-py/pysrc/sparrow_py/__init__.py | 6 +- sparrow-py/pysrc/sparrow_py/_ffi.pyi | 28 + sparrow-py/pysrc/sparrow_py/expr.py | 126 +- sparrow-py/pysrc/sparrow_py/ffi.pyi | 18 - sparrow-py/pysrc/sparrow_py/math.py | 23 +- sparrow-py/pysrc/sparrow_py/session.py | 47 + sparrow-py/pysrc/sparrow_py/udf.py | 10 +- sparrow-py/pytests/expr_test.py | 117 +- sparrow-py/pytests/session_test.py | 13 +- sparrow-py/pytests/udf_test.py | 9 +- sparrow-py/src/expr.rs | 130 +- sparrow-py/src/lib.rs | 1 + sparrow-py/src/session.rs | 68 +- 27 files changed, 3619 insertions(+), 624 deletions(-) create mode 100644 sparrow-py/pysrc/sparrow_py/_ffi.pyi delete mode 100644 sparrow-py/pysrc/sparrow_py/ffi.pyi create mode 100644 sparrow-py/pysrc/sparrow_py/session.py diff --git a/crates/sparrow-compiler/src/ast_to_dfg.rs b/crates/sparrow-compiler/src/ast_to_dfg.rs index 020f4be19..462aee2f3 100644 --- a/crates/sparrow-compiler/src/ast_to_dfg.rs +++ b/crates/sparrow-compiler/src/ast_to_dfg.rs @@ -6,7 +6,7 @@ mod window_args; #[cfg(test)] mod tests; -use std::rc::Rc; +use std::sync::Arc; use anyhow::{anyhow, Context}; use arrow::datatypes::{DataType, FieldRef}; @@ -135,7 +135,7 @@ pub(super) fn add_to_dfg( if CastEvaluator::is_supported_fenl(from_type, to_type) { if let FenlType::Concrete(to_type) = to_type.inner() { - return Ok(Rc::new(AstDfg::new( + return Ok(Arc::new(AstDfg::new( dfg.add_expression( Expression::Inst(InstKind::Cast(to_type.clone())), smallvec![input.value()], @@ -237,7 +237,7 @@ pub(super) fn add_to_dfg( )?; let is_new = base.is_new(); let value_type = field_type.clone().into(); - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, is_new, value_type, @@ -275,7 +275,7 @@ pub(super) fn add_to_dfg( let agg_input_op = dfg.operation(agg_input.value()); let tick_input = smallvec![agg_input_op]; let tick_node = dfg.add_operation(Operation::Tick(behavior), tick_input)?; - let tick_node = Rc::new(AstDfg::new( + let tick_node = Arc::new(AstDfg::new( tick_node, tick_node, FenlType::Concrete(DataType::Boolean), @@ -508,7 +508,7 @@ pub(super) fn add_to_dfg( // Add cast operations as necessary let args: Vec<_> = izip!(arguments, instantiated_types) .map(|(arg, expected_type)| -> anyhow::Result<_> { - let ast_dfg = Rc::new(AstDfg::new( + let ast_dfg = Arc::new(AstDfg::new( cast_if_needed(dfg, arg.value(), arg.value_type(), &expected_type)?, arg.is_new(), expected_type, @@ -751,7 +751,7 @@ fn add_literal( location: Location, ) -> anyhow::Result { let is_new = dfg.add_literal(false)?; - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, is_new, value_type, diff --git a/crates/sparrow-compiler/src/ast_to_dfg/ast_dfg.rs b/crates/sparrow-compiler/src/ast_to_dfg/ast_dfg.rs index e4c95fd12..cb94a1c3a 100644 --- a/crates/sparrow-compiler/src/ast_to_dfg/ast_dfg.rs +++ b/crates/sparrow-compiler/src/ast_to_dfg/ast_dfg.rs @@ -1,5 +1,4 @@ -use std::cell::RefCell; -use std::rc::Rc; +use std::sync::{Arc, Mutex}; use egg::Id; use sparrow_plan::GroupId; @@ -11,22 +10,22 @@ use crate::time_domain::TimeDomain; /// /// We may have multiple references to the same AstDfg node, so this allows us /// to clone shallow references rather than deeply copy. -pub type AstDfgRef = Rc; +pub type AstDfgRef = Arc; /// Various information produced for each AST node during the conversion to the /// DFG. -#[derive(Clone, Debug)] +#[derive(Debug)] pub struct AstDfg { /// Reference to the step containing the values of the AST node. /// /// Wrapped in a `RefCell` to allow mutability during /// pruning/simplification. - pub(crate) value: RefCell, + pub(crate) value: Mutex, /// Reference to the step containing the "is_new" bits of the AST node. /// /// Wrapped in a `RefCell` to allow mutability during /// pruning/simplification. - pub(crate) is_new: RefCell, + pub(crate) is_new: Mutex, /// Type of `value` produced. value_type: FenlType, /// Which entity grouping the node is associated with (if any). @@ -77,8 +76,8 @@ impl AstDfg { }; AstDfg { - value: RefCell::new(value), - is_new: RefCell::new(is_new), + value: Mutex::new(value), + is_new: Mutex::new(is_new), value_type, grouping, time_domain, @@ -87,12 +86,23 @@ impl AstDfg { } } - pub(crate) fn value(&self) -> Id { - *self.value.borrow() + pub fn equivalent(&self, other: &AstDfg) -> bool { + // This is quite correct -- we should lock everything and then compare. + // But, this is a temporary hack for the Python builder. + self.value() == other.value() + && self.is_new() == other.is_new() + && self.value_type == other.value_type + && self.grouping == other.grouping + && self.time_domain == other.time_domain + && self.location == other.location + } + + pub fn value(&self) -> Id { + *self.value.lock().unwrap() } pub(crate) fn is_new(&self) -> Id { - *self.is_new.borrow() + *self.is_new.lock().unwrap() } pub fn value_type(&self) -> &FenlType { diff --git a/crates/sparrow-compiler/src/ast_to_dfg/record_ops_to_dfg.rs b/crates/sparrow-compiler/src/ast_to_dfg/record_ops_to_dfg.rs index c37c3eab7..c94099e82 100644 --- a/crates/sparrow-compiler/src/ast_to_dfg/record_ops_to_dfg.rs +++ b/crates/sparrow-compiler/src/ast_to_dfg/record_ops_to_dfg.rs @@ -1,4 +1,4 @@ -use std::rc::Rc; +use std::sync::Arc; use anyhow::Context; use arrow::datatypes::{DataType, Field, FieldRef}; @@ -137,7 +137,7 @@ pub(super) fn record_to_dfg( // Create the value after the fields since this takes ownership of the names. let value = dfg.add_expression(Expression::Inst(InstKind::Record), instruction_args)?; - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, is_new, value_type, @@ -250,7 +250,7 @@ pub(super) fn extend_record_to_dfg( TimeDomain::error() }); - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, is_new, value_type, @@ -377,7 +377,7 @@ pub(super) fn select_remove_fields( let value = dfg.add_expression(Expression::Inst(InstKind::Record), record_args)?; let value_type = FenlType::Concrete(DataType::Struct(result_fields.into())); - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, record.is_new(), value_type, diff --git a/crates/sparrow-compiler/src/data_context.rs b/crates/sparrow-compiler/src/data_context.rs index fa5110c56..9623f6764 100644 --- a/crates/sparrow-compiler/src/data_context.rs +++ b/crates/sparrow-compiler/src/data_context.rs @@ -1,5 +1,4 @@ use std::collections::BTreeMap; -use std::rc::Rc; use std::sync::Arc; use anyhow::Context; @@ -423,7 +422,7 @@ impl TableInfo { let value_type = DataType::Struct(self.schema().fields().clone()); let value_type = FenlType::Concrete(value_type); - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, is_new, value_type, diff --git a/crates/sparrow-compiler/src/dfg.rs b/crates/sparrow-compiler/src/dfg.rs index 6c535e25b..818966002 100644 --- a/crates/sparrow-compiler/src/dfg.rs +++ b/crates/sparrow-compiler/src/dfg.rs @@ -28,7 +28,7 @@ pub mod simplification; mod step_kind; mod useless_transforms; -use std::rc::Rc; +use std::sync::Arc; pub(crate) use analysis::*; use anyhow::Context; @@ -80,7 +80,7 @@ impl Default for Dfg { // Preemptively create a single error node, allowing for shallow // clones of the reference. let error_id = graph.add(DfgLang::new(StepKind::Error, smallvec![])); - let error_node = Rc::new(AstDfg::new( + let error_node = Arc::new(AstDfg::new( error_id, error_id, FenlType::Error, @@ -488,12 +488,12 @@ impl Dfg { }); self.env.foreach_value(|node| { let old_value = old_graph.find(node.value()); - node.value - .replace_with(|_| mapping.get(&old_value).copied().unwrap_or(new_error)); + let new_value = mapping.get(&old_value).copied().unwrap_or(new_error); + *node.value.lock().unwrap() = new_value; let old_is_new = old_graph.find(node.is_new()); - node.is_new - .replace_with(|_| mapping.get(&old_is_new).copied().unwrap_or(new_error)); + let new_is_new = mapping.get(&old_is_new).copied().unwrap_or(new_error); + *node.is_new.lock().unwrap() = new_is_new; }); self.graph = new_graph; Ok(new_output) diff --git a/crates/sparrow-compiler/src/diagnostics/collector.rs b/crates/sparrow-compiler/src/diagnostics/collector.rs index 579e54b35..b34edbd3a 100644 --- a/crates/sparrow-compiler/src/diagnostics/collector.rs +++ b/crates/sparrow-compiler/src/diagnostics/collector.rs @@ -30,6 +30,7 @@ impl<'a> std::fmt::Debug for DiagnosticCollector<'a> { pub struct CollectedDiagnostic { code: DiagnosticCode, formatted: String, + pub message: String, } impl CollectedDiagnostic { @@ -119,9 +120,11 @@ impl<'a> DiagnosticCollector<'a> { self.collected.push(CollectedDiagnostic { code: DiagnosticCode::FailedToReport, formatted: "Failed to report diagnostic".to_owned(), + message: "Failed to report diagnostic".to_owned(), }); return; }; + let message = diagnostic.message.clone(); let formatted = match String::from_utf8(buffer.into_inner()) { Ok(formatted) => formatted, Err(err) => { @@ -132,12 +135,17 @@ impl<'a> DiagnosticCollector<'a> { self.collected.push(CollectedDiagnostic { code: DiagnosticCode::FailedToReport, formatted: "Failed to report diagnostic".to_owned(), + message, }); return; } }; - let diagnostic = CollectedDiagnostic { code, formatted }; + let diagnostic = CollectedDiagnostic { + code, + formatted, + message, + }; match code.severity() { Severity::Bug | Severity::Error => { diff --git a/crates/sparrow-compiler/src/frontend.rs b/crates/sparrow-compiler/src/frontend.rs index 9089f8302..36fa5b390 100644 --- a/crates/sparrow-compiler/src/frontend.rs +++ b/crates/sparrow-compiler/src/frontend.rs @@ -10,7 +10,7 @@ pub(crate) mod resolve_arguments; mod slice_analysis; use std::collections::BTreeSet; -use std::rc::Rc; +use std::sync::Arc; use anyhow::anyhow; use arrow::datatypes::{DataType, TimeUnit}; @@ -352,7 +352,7 @@ fn create_changed_since_time_node(dfg: &mut Dfg) -> anyhow::Result { )?; let value_type = FenlType::Concrete(DataType::Timestamp(TimeUnit::Nanosecond, None)); let is_new = dfg.add_literal(false)?; - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, is_new, value_type, @@ -375,7 +375,7 @@ fn create_final_at_time_time_node(dfg: &mut Dfg) -> anyhow::Result { )?; let value_type = FenlType::Concrete(DataType::Timestamp(TimeUnit::Nanosecond, None)); let is_new = dfg.add_literal(false)?; - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, is_new, value_type, diff --git a/crates/sparrow-compiler/src/functions/function.rs b/crates/sparrow-compiler/src/functions/function.rs index baa156ea1..03e2591f2 100644 --- a/crates/sparrow-compiler/src/functions/function.rs +++ b/crates/sparrow-compiler/src/functions/function.rs @@ -1,5 +1,5 @@ -use std::rc::Rc; use std::str::FromStr; +use std::sync::Arc; use egg::{Subst, Var}; use itertools::{izip, Itertools}; @@ -224,7 +224,7 @@ impl Function { self.time_domain_check .check_args(location, diagnostics, args, data_context)?; - Ok(Rc::new(AstDfg::new( + Ok(Arc::new(AstDfg::new( value, is_new, value_type, diff --git a/crates/sparrow-compiler/src/query_builder.rs b/crates/sparrow-compiler/src/query_builder.rs index 5465e3a4d..1439e389c 100644 --- a/crates/sparrow-compiler/src/query_builder.rs +++ b/crates/sparrow-compiler/src/query_builder.rs @@ -14,7 +14,7 @@ use uuid::Uuid; /// Kaskada query builder. #[derive(Default)] pub struct QueryBuilder { - data_context: DataContext, + pub data_context: DataContext, dfg: Dfg, } @@ -28,8 +28,8 @@ pub enum Error { Invalid, #[display(fmt = "no function named '{name}': nearest matches are {nearest:?}")] NoSuchFunction { name: String, nearest: Vec }, - #[display(fmt = "errors during construction")] - Errors, + #[display(fmt = "{}", "_0.iter().join(\"\n\")")] + Errors(Vec), } impl error_stack::Context for Error {} @@ -106,7 +106,13 @@ impl QueryBuilder { .change_context(Error::Invalid)?; if diagnostics.num_errors() > 0 { - Err(Error::Errors)? + let errors = diagnostics + .finish() + .into_iter() + .filter(|diagnostic| diagnostic.is_error()) + .map(|diagnostic| diagnostic.message) + .collect(); + Err(Error::Errors(errors))? } else { Ok(result) } @@ -128,12 +134,12 @@ impl QueryBuilder { pub fn add_expr( &mut self, function: &str, - args: &[AstDfgRef], + args: Vec, ) -> error_stack::Result { let (op, args) = match function { "fieldref" => { assert_eq!(args.len(), 2); - let (base, name) = args.iter().cloned().collect_tuple().unwrap(); + let (base, name) = args.into_iter().collect_tuple().unwrap(); let name = self.dfg.string_literal(name.value()).expect("literal name"); @@ -182,7 +188,7 @@ impl QueryBuilder { let has_vararg = args.len() > function.signature().arg_names().len(); let args = Resolved::new( function.signature().arg_names().into(), - args.iter().cloned().map(Located::builder).collect(), + args.into_iter().map(Located::builder).collect(), has_vararg, ); (op, args) @@ -224,7 +230,7 @@ mod tests { .add_literal(Literal::StringLiteral("a".to_owned())) .unwrap(); let field_ref = query_builder - .add_expr("fieldref", &[table, field_name]) + .add_expr("fieldref", vec![table, field_name]) .unwrap(); assert_eq!( diff --git a/sparrow-py/Cargo.lock b/sparrow-py/Cargo.lock index 0dd1cfd3b..5818f31fe 100644 --- a/sparrow-py/Cargo.lock +++ b/sparrow-py/Cargo.lock @@ -2,6 +2,38 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "adler32" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.3" @@ -10,7 +42,7 @@ checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", "const-random", - "getrandom", + "getrandom 0.2.10", "once_cell", "version_check", ] @@ -24,6 +56,27 @@ dependencies = [ "memchr", ] +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -39,13 +92,80 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +dependencies = [ + "backtrace", +] + +[[package]] +name = "approx" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +dependencies = [ + "num-traits", +] + [[package]] name = "arrow" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022f3a3f389ac02a971427acafeab9b74c81c49ee5fb94fe781a2956cbca3aa6" +checksum = "2feeebd77b34b0bc88f224e06d01c27da4733997cc4789a4e056196656cdc59a" dependencies = [ - "ahash", + "ahash 0.8.3", "arrow-arith", "arrow-array", "arrow-buffer", @@ -64,9 +184,9 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b94d8e21d4d195fa371dba4d6684a7e3196ca5696278812e3ceefca9559a8f" +checksum = "7173f5dc49c0ecb5135f52565af33afd3fdc9a12d13bd6f9973e8b96305e4b2e" dependencies = [ "arrow-array", "arrow-buffer", @@ -79,26 +199,25 @@ dependencies = [ [[package]] name = "arrow-array" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e09d42ecd482a864445ed95bf78fb159e37b4d879ca08405b247170fb331daf5" +checksum = "63d7ea725f7d1f8bb2cffc53ef538557e95fc802e217d5be25122d402e22f3d0" dependencies = [ - "ahash", + "ahash 0.8.3", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", "half", - "hashbrown", + "hashbrown 0.14.0", "num", - "num-complex", ] [[package]] name = "arrow-buffer" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5044e672568feeb9e134a96781c8fdee3bce58df889f463517880d4992f751" +checksum = "bdbe439e077f484e5000b9e1d47b5e4c0d15f2b311a8f5bcc682553d5d67a722" dependencies = [ "half", "num", @@ -106,9 +225,9 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac1141b252f3c4e240de118125fb2ece6a2e31d9740ec98a471feda35898e76" +checksum = "93913cc14875770aa1eef5e310765e855effa352c094cb1c7c00607d0f37b4e1" dependencies = [ "arrow-array", "arrow-buffer", @@ -123,9 +242,9 @@ dependencies = [ [[package]] name = "arrow-csv" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a5e99b4852cc8c85c2274093ba20f4f490266bdecd2fa7c3663c956a5089b5" +checksum = "ef55b67c55ed877e6fe7b923121c19dae5e31ca70249ea2779a17b58fb0fbd9a" dependencies = [ "arrow-array", "arrow-buffer", @@ -142,9 +261,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "425a65a08947ed20b54e66749e9a56ed5a1cb1366c001329470dff365dd8411a" +checksum = "d4f4f4a3c54614126a71ab91f6631c9743eb4643d6e9318b74191da9dc6e028b" dependencies = [ "arrow-buffer", "arrow-schema", @@ -154,9 +273,9 @@ dependencies = [ [[package]] name = "arrow-ipc" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db281245b30c8ac194ed048f1c9bd62ce3d3bfd9a955b6cfe90b554708820bce" +checksum = "d41a3659f984a524ef1c2981d43747b24d8eec78e2425267fcd0ef34ce71cd18" dependencies = [ "arrow-array", "arrow-buffer", @@ -168,9 +287,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041e8616f7b1b86ebd66dc472b6edb0284dfec80d15ab8e7573934093317662" +checksum = "10b95faa95a378f56ef32d84cc0104ea998c39ef7cd1faaa6b4cebf8ea92846d" dependencies = [ "arrow-array", "arrow-buffer", @@ -179,7 +298,7 @@ dependencies = [ "arrow-schema", "chrono", "half", - "indexmap", + "indexmap 2.0.0", "lexical-core", "num", "serde", @@ -188,9 +307,9 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66226fbe71670fa7f95bd4734379a9b14096b4498ed48935d69b5d3c27f96a7f" +checksum = "c68549a4284d9f8b39586afb8d5ff8158b8f0286353a4844deb1d11cf1ba1f26" dependencies = [ "arrow-array", "arrow-buffer", @@ -203,33 +322,34 @@ dependencies = [ [[package]] name = "arrow-row" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f41b69153013b7594edf4a1e6318d36ad539e0be66a7f62ae872f51dea507ac" +checksum = "0a75a4a757afc301ce010adadff54d79d66140c4282ed3de565f6ccb716a5cf3" dependencies = [ - "ahash", + "ahash 0.8.3", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "half", - "hashbrown", + "hashbrown 0.14.0", ] [[package]] name = "arrow-schema" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dceed0efbaf304aaa296169c9eedde4e0ec90e0dc2010a88ea79ea6d86046ae9" +checksum = "2bebcb57eef570b15afbcf2d07d813eb476fde9f6dd69c81004d6476c197e87e" dependencies = [ "bitflags 2.3.3", + "serde", ] [[package]] name = "arrow-select" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1640b6be81eddc789e0fa6c4c4c621411afa195146bda577a51de845b368573" +checksum = "f6e2943fa433a48921e914417173816af64eef61c0a3d448280e6c40a62df221" dependencies = [ "arrow-array", "arrow-buffer", @@ -240,9 +360,9 @@ dependencies = [ [[package]] name = "arrow-string" -version = "44.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb780faf7995b2f4f6273109520435262e10fbaba047ebcf13347770bd79d28" +checksum = "bbc92ed638851774f6d7af1ad900b92bc1486746497511868b4298fcbcfa35af" dependencies = [ "arrow-array", "arrow-buffer", @@ -251,676 +371,3121 @@ dependencies = [ "arrow-select", "num", "regex", - "regex-syntax", + "regex-syntax 0.7.4", ] [[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bitflags" -version = "1.3.2" +name = "ascii-canvas" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] [[package]] -name = "bitflags" -version = "2.3.3" +name = "async-trait" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] [[package]] -name = "bumpalo" -version = "3.13.0" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "cc" -version = "1.0.79" +name = "avro-rs" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "ece550dd6710221de9bcdc1697424d8eee4fc4ca7e017479ea9d50c348465e37" +dependencies = [ + "byteorder", + "digest 0.9.0", + "lazy_static", + "libflate", + "num-bigint 0.2.6", + "rand 0.7.3", + "serde", + "serde_json", + "strum 0.18.0", + "strum_macros 0.18.0", + "thiserror", + "typed-builder", + "uuid 0.8.2", + "zerocopy", +] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "avro-schema" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "b5281855b39aba9684d2f47bf96983fbfd8f1725f12fabb0513a8ab879647bbd" +dependencies = [ + "fallible-streaming-iterator", + "serde", + "serde_json", +] [[package]] -name = "chrono" -version = "0.4.26" +name = "axum" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "winapi", + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", ] [[package]] -name = "const-random" -version = "0.1.15" +name = "axum-core" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ - "const-random-macro", - "proc-macro-hack", + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", ] [[package]] -name = "const-random-macro" -version = "0.1.15" +name = "backtrace" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ - "getrandom", - "once_cell", - "proc-macro-hack", - "tiny-keccak", + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] [[package]] -name = "core-foundation-sys" -version = "0.8.4" +name = "base64" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] -name = "crunchy" -version = "0.2.2" +name = "beef" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" [[package]] -name = "csv" -version = "1.2.2" +name = "bigdecimal" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +checksum = "454bca3db10617b88b566f205ed190aedb0e0e6dd4cad61d3988a72e8c5594cb" dependencies = [ - "csv-core", - "itoa", - "ryu", + "autocfg", + "libm", + "num-bigint 0.4.3", + "num-integer", + "num-traits", "serde", ] [[package]] -name = "csv-core" -version = "0.1.10" +name = "bincode" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "memchr", + "serde", ] [[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "equivalent" -version = "1.0.1" +name = "bindgen" +version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "flatbuffers" -version = "23.5.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ "bitflags 1.3.2", - "rustc_version", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "prettyplease 0.2.12", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.27", ] [[package]] -name = "getrandom" -version = "0.2.10" +name = "bit-set" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "cfg-if", - "libc", - "wasi", + "bit-vec", ] [[package]] -name = "half" -version = "2.3.1" +name = "bit-vec" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" -dependencies = [ - "cfg-if", - "crunchy", - "num-traits", -] +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] -name = "hashbrown" -version = "0.14.0" +name = "bitflags" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "iana-time-zone" -version = "0.1.57" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", -] +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "bitvec" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "cc", + "funty", + "radium", + "serde", + "tap", + "wyz", ] [[package]] -name = "indexmap" -version = "2.0.0" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "equivalent", - "hashbrown", + "generic-array", ] [[package]] -name = "indoc" -version = "1.0.9" +name = "brotli" +version = "3.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" +checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] [[package]] -name = "itertools" -version = "0.11.0" +name = "brotli-decompressor" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" dependencies = [ - "either", + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] -name = "itoa" -version = "1.0.9" +name = "bumpalo" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] -name = "js-sys" -version = "0.3.64" +name = "byteorder" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" -dependencies = [ - "wasm-bindgen", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] -name = "lazy_static" +name = "bytes" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] -name = "lexical-core" -version = "0.8.5" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", -] + "cc", + "libc", + "pkg-config", +] [[package]] -name = "lexical-parse-float" -version = "0.8.5" +name = "cc" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", + "jobserver", ] [[package]] -name = "lexical-parse-integer" -version = "0.8.6" +name = "cexpr" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "lexical-util", - "static_assertions", + "nom", ] [[package]] -name = "lexical-util" -version = "0.8.5" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "chrono" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ - "static_assertions", + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "time", + "wasm-bindgen", + "winapi", ] [[package]] -name = "lexical-write-float" -version = "0.8.5" +name = "chronoutil" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "154aa5253c981d51e9466afc1e9ce41631197837fd1c41ee931008f229b8a3d7" dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", + "chrono", ] [[package]] -name = "lexical-write-integer" -version = "0.8.5" +name = "clang-sys" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ - "lexical-util", - "static_assertions", + "glob", + "libc", + "libloading", ] [[package]] -name = "libc" -version = "0.2.147" +name = "clap" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] [[package]] -name = "libm" -version = "0.2.7" +name = "clap_builder" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] [[package]] -name = "lock_api" -version = "0.4.10" +name = "clap_derive" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ - "autocfg", - "scopeguard", + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.27", ] [[package]] -name = "log" -version = "0.4.19" +name = "clap_lex" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] -name = "memchr" -version = "2.5.0" +name = "codespan-reporting" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] [[package]] -name = "memoffset" -version = "0.9.0" +name = "colorchoice" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "const-random" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" dependencies = [ - "autocfg", + "const-random-macro", + "proc-macro-hack", ] [[package]] -name = "num" -version = "0.4.1" +name = "const-random-macro" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", + "getrandom 0.2.10", + "once_cell", + "proc-macro-hack", + "tiny-keccak", ] [[package]] -name = "num-bigint" -version = "0.4.3" +name = "const_format" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "c990efc7a285731f9a4378d81aff2f0e85a2c8781a05ef0f8baa8dac54d0ff48" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "const_format_proc_macros", ] [[package]] -name = "num-complex" -version = "0.4.3" +name = "const_format_proc_macros" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "e026b6ce194a874cb9cf32cd5772d1ef9767cc8fcb5765948d74f37a9d8b2bf6" dependencies = [ - "num-traits", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "convert_case" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ - "autocfg", - "num-traits", + "libc", ] [[package]] -name = "num-iter" -version = "0.1.43" +name = "crc32fast" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "cfg-if", ] [[package]] -name = "num-rational" -version = "0.4.1" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "autocfg", - "num-bigint", - "num-integer", + "generic-array", + "typenum", +] + +[[package]] +name = "csv" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + +[[package]] +name = "decorum" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "281759d3c8a14f5c3f0c49363be56810fcd7f910422f97f2db850c2920fde5cf" +dependencies = [ + "approx", "num-traits", + "serde", + "serde_derive", ] [[package]] -name = "num-traits" -version = "0.2.16" +name = "derive_more" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "autocfg", - "libm", + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "diff" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] -name = "parking_lot" -version = "0.12.1" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "lock_api", - "parking_lot_core", + "generic-array", ] [[package]] -name = "parking_lot_core" -version = "0.9.8" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ "libc", - "redox_syscall", + "redox_users", + "winapi", +] + +[[package]] +name = "edit-distance" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbaaaf38131deb9ca518a274a45bfdb8771f139517b073b16c2d3d32ae5037b" + +[[package]] +name = "egg" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96beaf9d35dbc4686bc86a4ecb851fd6a406f0bf32d9f646b1225a5c5cf5b5d7" +dependencies = [ + "env_logger", + "fxhash", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "instant", + "log", "smallvec", - "windows-targets", + "symbol_table", + "symbolic_expressions", + "thiserror", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "ena" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +dependencies = [ + "log", +] + +[[package]] +name = "enum-map" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "017b207acb4cc917f4c31758ed95c0bc63ddb0f358b22eb38f80a2b2a43f6b1f" +dependencies = [ + "enum-map-derive", +] + +[[package]] +name = "enum-map-derive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8560b409800a72d2d7860f8e5f4e0b0bd22bea6a352ea2a9ce30ccdef7f16d2f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "log", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "erased-serde" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da96524cc884f6558f1769b6c46686af2fe8e8b4cd253bd5a3cdba8181b8e070" +dependencies = [ + "serde", +] + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "error-stack" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f00447f331c7f726db5b8532ebc9163519eed03c6d7c8b73c90b3ff5646ac85" +dependencies = [ + "anyhow", + "rustc_version", + "tracing-error", +] + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flatbuffers" +version = "23.5.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" +dependencies = [ + "bitflags 1.3.2", + "rustc_version", +] + +[[package]] +name = "flate2" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-executor" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "h2" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash 0.8.3", + "allocator-api2", + "serde", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "indoc" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "integer-encoding" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" + +[[package]] +name = "inventory" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53088c87cf71c9d4f3372a2cb9eea1e7b8a0b1bf8b7f7d23fe5b76dbb07e63b" + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lalrpop" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +dependencies = [ + "ascii-canvas", + "bit-set", + "diff", + "ena", + "is-terminal", + "itertools 0.10.5", + "lalrpop-util", + "petgraph", + "pico-args", + "regex", + "regex-syntax 0.7.4", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" +dependencies = [ + "regex", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "lexical-core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +dependencies = [ + "lexical-parse-float", + "lexical-parse-integer", + "lexical-util", + "lexical-write-float", + "lexical-write-integer", +] + +[[package]] +name = "lexical-parse-float" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +dependencies = [ + "lexical-parse-integer", + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-parse-integer" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +dependencies = [ + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-util" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "lexical-write-float" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +dependencies = [ + "lexical-util", + "lexical-write-integer", + "static_assertions", +] + +[[package]] +name = "lexical-write-integer" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +dependencies = [ + "lexical-util", + "static_assertions", +] + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "libflate" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ff4ae71b685bbad2f2f391fe74f6b7659a34871c08b210fdc039e43bee07d18" +dependencies = [ + "adler32", + "crc32fast", + "libflate_lz77", +] + +[[package]] +name = "libflate_lz77" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a52d3a8bfc85f250440e4424db7d857e241a3aebbbe301f3eb606ab15c39acbf" +dependencies = [ + "rle-decode-fast", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libm" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" + +[[package]] +name = "librocksdb-sys" +version = "0.11.0+8.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" +dependencies = [ + "bindgen", + "bzip2-sys", + "cc", + "glob", + "libc", + "libz-sys", + "lz4-sys", +] + +[[package]] +name = "libz-sys" +version = "1.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "logos" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf8b031682c67a8e3d5446840f9573eb7fe26efe7ec8d195c9ac4c0647c502f1" +dependencies = [ + "logos-derive", +] + +[[package]] +name = "logos-derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d849148dbaf9661a6151d1ca82b13bb4c4c128146a88d05253b38d4e2f496c" +dependencies = [ + "beef", + "fnv", + "proc-macro2", + "quote", + "regex-syntax 0.6.29", + "syn 1.0.109", +] + +[[package]] +name = "lz4" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "matchit" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +dependencies = [ + "num-bigint 0.4.3", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint 0.4.3", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "ordered-float" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +dependencies = [ + "num-traits", +] + +[[package]] +name = "owning_ref" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.8", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "smallvec", + "windows-targets", +] + +[[package]] +name = "parquet" +version = "43.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7267a9607c3f955d4d0ac41b88a67cecc0d8d009173ad3da390699a6cb3750" +dependencies = [ + "ahash 0.8.3", + "arrow-array", + "arrow-buffer", + "arrow-cast", + "arrow-data", + "arrow-ipc", + "arrow-schema", + "arrow-select", + "base64", + "brotli", + "bytes", + "chrono", + "flate2", + "futures", + "hashbrown 0.14.0", + "lz4", + "num", + "num-bigint 0.4.3", + "paste", + "seq-macro", + "snap", + "thrift", + "tokio", + "twox-hash", + "zstd", +] + +[[package]] +name = "parse-display" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6509d08722b53e8dafe97f2027b22ccbe3a5db83cb352931e9716b0aa44bc5c" +dependencies = [ + "once_cell", + "parse-display-derive", + "regex", +] + +[[package]] +name = "parse-display-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68517892c8daf78da08c0db777fcc17e07f2f63ef70041718f8a7630ad84f341" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "regex", + "regex-syntax 0.7.4", + "structmeta", + "syn 2.0.27", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "petgraph" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +dependencies = [ + "fixedbitset", + "indexmap 1.9.3", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + +[[package]] +name = "pin-project" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "prettyplease" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +dependencies = [ + "proc-macro2", + "syn 2.0.27", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +dependencies = [ + "bytes", + "heck 0.4.1", + "itertools 0.10.5", + "lazy_static", + "log", + "multimap", + "petgraph", + "prettyplease 0.1.25", + "prost", + "prost-types", + "regex", + "syn 1.0.109", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", +] + +[[package]] +name = "prost-wkt" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562788060bcf2bfabe055194bd991ed2442457661744c88e0a0828ff9a08c08b" +dependencies = [ + "chrono", + "inventory", + "prost", + "serde", + "serde_derive", + "serde_json", + "typetag", +] + +[[package]] +name = "prost-wkt-build" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4dca8bcead3b728a6a7da017cc95e7f4cb2320ec4f6896bc593a1c4700f7328" +dependencies = [ + "heck 0.4.1", + "prost", + "prost-build", + "prost-types", + "quote", +] + +[[package]] +name = "prost-wkt-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2377c5680f2342871823045052e791b4487f7c90aae17e0feaee24cf59578a34" +dependencies = [ + "chrono", + "prost", + "prost-build", + "prost-types", + "prost-wkt", + "prost-wkt-build", + "regex", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "pyo3" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb88ae05f306b4bfcde40ac4a51dc0b05936a9207a4b75b798c7729c4258a59" +dependencies = [ + "cfg-if", + "indoc", + "libc", + "memoffset", + "parking_lot 0.12.1", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" +dependencies = [ + "once_cell", + "python3-dll-a", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "922ede8759e8600ad4da3195ae41259654b9c55da4f7eec84a0ccc7d067a70a4" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "python3-dll-a" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f07cd4412be8fa09a721d40007c483981bbe072cd6a21f2e83e04ec8f8343f" +dependencies = [ + "cc", +] + +[[package]] +name = "quote" +version = "1.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.10", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom 0.2.10", + "redox_syscall 0.2.16", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax 0.7.4", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "rle-decode-fast" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" + +[[package]] +name = "rocksdb" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" +dependencies = [ + "libc", + "librocksdb-sys", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "seq-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" + +[[package]] +name = "serde" +version = "1.0.176" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76dc28c9523c5d70816e393136b86d48909cfb27cecaa902d338c19ed47164dc" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.176" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e7b8c5dc823e3b90651ff1d3808419cd14e5ad76de04feaf37da114e7a306f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "serde_json" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.9.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +dependencies = [ + "indexmap 2.0.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" + +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +dependencies = [ + "serde", +] + +[[package]] +name = "snap" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "sparrow-api" +version = "0.10.0" +dependencies = [ + "anyhow", + "arrow", + "chrono", + "clap", + "decorum", + "derive_more", + "enum-map", + "error-stack", + "itertools 0.11.0", + "prost", + "prost-build", + "prost-types", + "prost-wkt", + "prost-wkt-build", + "prost-wkt-types", + "serde", + "serde_yaml", + "sparrow-arrow", + "sparrow-syntax", + "tempfile", + "thiserror", + "tokio", + "tonic", + "tonic-build", + "uuid 1.4.1", +] + +[[package]] +name = "sparrow-arrow" +version = "0.10.0" +dependencies = [ + "ahash 0.8.3", + "anyhow", + "arrow", + "arrow-array", + "arrow-buffer", + "arrow-schema", + "arrow-select", + "avro-rs", + "avro-schema", + "chrono", + "decorum", + "derive_more", + "error-stack", + "half", + "itertools 0.11.0", + "num", + "serde", + "static_init", + "tracing", +] + +[[package]] +name = "sparrow-compiler" +version = "0.10.0" +dependencies = [ + "ahash 0.8.3", + "anyhow", + "arrow", + "arrow-schema", + "bit-set", + "chrono", + "clap", + "codespan-reporting", + "const_format", + "decorum", + "derive_more", + "edit-distance", + "egg", + "enum-map", + "error-stack", + "hashbrown 0.14.0", + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "logos", + "num", + "once_cell", + "prost", + "prost-types", + "prost-wkt", + "prost-wkt-types", + "serde", + "serde_yaml", + "sha2", + "smallvec", + "sparrow-api", + "sparrow-arrow", + "sparrow-core", + "sparrow-instructions", + "sparrow-kernels", + "sparrow-plan", + "sparrow-syntax", + "static_init", + "strum 0.25.0", + "strum_macros 0.25.1", + "termcolor", + "thiserror", + "tonic", + "tracing", + "uuid 1.4.1", +] + +[[package]] +name = "sparrow-core" +version = "0.10.0" +dependencies = [ + "anyhow", + "arrow", + "chrono", + "decorum", + "futures", + "itertools 0.11.0", + "num", + "owning_ref", + "parquet", + "serde", + "sparrow-arrow", + "static_init", + "tonic", + "tracing", +] + +[[package]] +name = "sparrow-instructions" +version = "0.10.0" +dependencies = [ + "anyhow", + "arrow", + "arrow-schema", + "bincode", + "bit-set", + "bitvec", + "chrono", + "derive_more", + "erased-serde", + "error-stack", + "hashbrown 0.14.0", + "itertools 0.11.0", + "lz4-sys", + "num", + "owning_ref", + "prost", + "prost-wkt-types", + "rocksdb", + "serde", + "serde_json", + "smallvec", + "sparrow-api", + "sparrow-arrow", + "sparrow-kernels", + "sparrow-plan", + "sparrow-syntax", + "static_init", + "tempfile", + "tonic", + "tracing", +] + +[[package]] +name = "sparrow-kernels" +version = "0.10.0" +dependencies = [ + "anyhow", + "arrow", + "bitvec", + "chrono", + "chronoutil", + "itertools 0.11.0", + "num", + "smallvec", + "sparrow-arrow", + "static_init", + "substring", +] + +[[package]] +name = "sparrow-plan" +version = "0.10.0" +dependencies = [ + "anyhow", + "arrow", + "enum-map", + "hashbrown 0.14.0", + "itertools 0.11.0", + "parse-display", + "sparrow-api", + "sparrow-arrow", + "sparrow-syntax", + "static_init", + "strum 0.25.0", + "strum_macros 0.25.1", + "tracing", + "uuid 1.4.1", +] + +[[package]] +name = "sparrow-py" +version = "0.1.0" +dependencies = [ + "arrow", + "error-stack", + "itertools 0.11.0", + "pyo3", + "sparrow-compiler", + "sparrow-syntax", +] + +[[package]] +name = "sparrow-syntax" +version = "0.10.0" +dependencies = [ + "anyhow", + "arrow", + "arrow-schema", + "bigdecimal", + "bitvec", + "codespan-reporting", + "decorum", + "hashbrown 0.14.0", + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "logos", + "serde", + "smallvec", + "sparrow-arrow", + "static_init", + "thiserror", + "tracing", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "static_init" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" +dependencies = [ + "bitflags 1.3.2", + "cfg_aliases", + "libc", + "parking_lot 0.11.2", + "parking_lot_core 0.8.6", + "static_init_macro", + "winapi", +] + +[[package]] +name = "static_init_macro" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" +dependencies = [ + "cfg_aliases", + "memchr", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.1", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "structmeta" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ad9e09554f0456d67a69c1584c9798ba733a5b50349a6c0d0948710523922d" +dependencies = [ + "proc-macro2", + "quote", + "structmeta-derive", + "syn 2.0.27", +] + +[[package]] +name = "structmeta-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "strum" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + +[[package]] +name = "strum_macros" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "strum_macros" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6069ca09d878a33f883cc06aaa9718ede171841d3832450354410b718b097232" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.27", +] + +[[package]] +name = "substring" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" +dependencies = [ + "autocfg", +] + +[[package]] +name = "symbol_table" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32bf088d1d7df2b2b6711b06da3471bc86677383c57b27251e18c56df8deac14" +dependencies = [ + "ahash 0.7.6", + "hashbrown 0.12.3", +] + +[[package]] +name = "symbolic_expressions" +version = "5.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c68d531d83ec6c531150584c42a4290911964d5f0d79132b193b67252a23b71" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "target-lexicon" +version = "0.12.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2faeef5759ab89935255b1a4cd98e0baf99d1085e37d36599c625dac49ae8e" + +[[package]] +name = "tempfile" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall 0.3.5", + "rustix", + "windows-sys", +] + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", ] [[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" +name = "thiserror" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +dependencies = [ + "thiserror-impl", +] [[package]] -name = "proc-macro2" -version = "1.0.66" +name = "thiserror-impl" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ - "unicode-ident", + "proc-macro2", + "quote", + "syn 2.0.27", ] [[package]] -name = "pyo3" -version = "0.19.1" +name = "thread_local" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb88ae05f306b4bfcde40ac4a51dc0b05936a9207a4b75b798c7729c4258a59" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ "cfg-if", - "indoc", - "libc", - "memoffset", - "parking_lot", - "pyo3-build-config", - "pyo3-ffi", - "pyo3-macros", - "unindent", + "once_cell", ] [[package]] -name = "pyo3-build-config" -version = "0.19.1" +name = "thrift" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" +checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" dependencies = [ - "once_cell", - "python3-dll-a", - "target-lexicon", + "byteorder", + "integer-encoding", + "ordered-float", ] [[package]] -name = "pyo3-ffi" -version = "0.19.1" +name = "time" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "922ede8759e8600ad4da3195ae41259654b9c55da4f7eec84a0ccc7d067a70a4" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", - "pyo3-build-config", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", ] [[package]] -name = "pyo3-macros" -version = "0.19.1" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "proc-macro2", - "pyo3-macros-backend", - "quote", - "syn 1.0.109", + "crunchy", ] [[package]] -name = "pyo3-macros-backend" -version = "0.19.1" +name = "tokio" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "autocfg", + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys", ] [[package]] -name = "python3-dll-a" -version = "0.2.9" +name = "tokio-io-timeout" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f07cd4412be8fa09a721d40007c483981bbe072cd6a21f2e83e04ec8f8343f" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ - "cc", + "pin-project-lite", + "tokio", ] [[package]] -name = "quote" -version = "1.0.31" +name = "tokio-macros" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", + "quote", + "syn 2.0.27", ] [[package]] -name = "redox_syscall" -version = "0.3.5" +name = "tokio-stream" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ - "bitflags 1.3.2", + "futures-core", + "pin-project-lite", + "tokio", ] [[package]] -name = "regex" -version = "1.9.1" +name = "tokio-util" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", ] [[package]] -name = "regex-automata" -version = "0.3.3" +name = "tonic" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "async-trait", + "axum", + "base64", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", ] [[package]] -name = "regex-syntax" -version = "0.7.4" +name = "tonic-build" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" +dependencies = [ + "prettyplease 0.1.25", + "proc-macro2", + "prost-build", + "quote", + "syn 1.0.109", +] [[package]] -name = "rustc_version" -version = "0.4.0" +name = "tower" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "semver", + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", ] [[package]] -name = "ryu" -version = "1.0.15" +name = "tower-layer" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] -name = "scopeguard" -version = "1.2.0" +name = "tower-service" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] -name = "semver" -version = "1.0.18" +name = "tracing" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] [[package]] -name = "serde" -version = "1.0.175" +name = "tracing-attributes" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d25439cd7397d044e2748a6fe2432b5e85db703d6d097bd014b3c0ad1ebff0b" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] [[package]] -name = "serde_json" -version = "1.0.103" +name = "tracing-core" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ - "itoa", - "ryu", - "serde", + "once_cell", ] [[package]] -name = "smallvec" -version = "1.11.0" +name = "tracing-error" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +dependencies = [ + "tracing", + "tracing-subscriber", +] [[package]] -name = "sparrow-py" -version = "0.1.0" +name = "tracing-subscriber" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ - "arrow", - "itertools", - "pyo3", + "sharded-slab", + "thread_local", + "tracing-core", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "try-lock" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] -name = "syn" -version = "1.0.109" +name = "twox-hash" +version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "cfg-if", + "static_assertions", ] [[package]] -name = "syn" -version = "2.0.27" +name = "typed-builder" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +checksum = "78cea224ddd4282dfc40d1edabbd0c020a12e946e3a48e2c2b8f6ff167ad29fe" dependencies = [ "proc-macro2", "quote", - "unicode-ident", + "syn 1.0.109", ] [[package]] -name = "target-lexicon" -version = "0.12.10" +name = "typenum" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2faeef5759ab89935255b1a4cd98e0baf99d1085e37d36599c625dac49ae8e" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] -name = "tiny-keccak" -version = "2.0.2" +name = "typetag" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +checksum = "aec6850cc671cd0cfb3ab285465e48a3b927d9de155051c35797446b32f9169f" dependencies = [ - "crunchy", + "erased-serde", + "inventory", + "once_cell", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30c49a6815b4f8379c36f06618bc1b80ca77aaf8a3fd4d8549dca6fdb016000f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", ] [[package]] @@ -929,18 +3494,94 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + [[package]] name = "unindent" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" +[[package]] +name = "unsafe-libyaml" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.10", + "serde", +] + +[[package]] +name = "uuid" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +dependencies = [ + "getrandom 0.2.10", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1001,6 +3642,17 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +[[package]] +name = "which" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +dependencies = [ + "either", + "libc", + "once_cell", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1017,6 +3669,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1032,6 +3693,15 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-targets" version = "0.48.1" @@ -1088,3 +3758,63 @@ name = "windows_x86_64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6580539ad917b7c026220c4b3f2c08d52ce54d6ce0dc491e66002e35388fab46" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d498dbd1fd7beb83c86709ae1c33ca50942889473473d287d56ce4770a18edfb" +dependencies = [ + "proc-macro2", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.8+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +dependencies = [ + "cc", + "libc", + "pkg-config", +] diff --git a/sparrow-py/Cargo.toml b/sparrow-py/Cargo.toml index 037656705..4ddee8ecb 100644 --- a/sparrow-py/Cargo.toml +++ b/sparrow-py/Cargo.toml @@ -12,9 +12,12 @@ Python library for building and executing Kaskada queries. [workspace] [dependencies] +arrow = { version = "43.0.0", features = ["pyarrow"] } +error-stack = { version = "0.3.1", features = ["anyhow", "spantrace"] } itertools = "0.11.0" -arrow = {version = "44.0.0", features = ["pyarrow"] } -pyo3 = {version = "0.19.1", features = ["abi3-py37", "extension-module", "generate-import-lib"]} +pyo3 = {version = "0.19.1", features = ["abi3-py38", "extension-module", "generate-import-lib"]} +sparrow-compiler = { path = "../crates/sparrow-compiler" } +sparrow-syntax = { path = "../crates/sparrow-syntax" } [lib] name = "sparrow_py" diff --git a/sparrow-py/mypy.ini b/sparrow-py/mypy.ini index 778a13570..54c86eb3e 100644 --- a/sparrow-py/mypy.ini +++ b/sparrow-py/mypy.ini @@ -1,4 +1,12 @@ [mypy] [mypy-desert,marshmallow,nox.*,pytest,pytest_mock,_pytest.*] +ignore_missing_imports = True + +# pyarrow doesn't currently expose mypy stubs: +# +# - https://github.com/apache/arrow/issues/32609 +# - https://github.com/apache/arrow/issues/33113 +# - https://github.com/apache/arrow/issues/36113 +[mypy-pyarrow.*] ignore_missing_imports = True \ No newline at end of file diff --git a/sparrow-py/noxfile.py b/sparrow-py/noxfile.py index 74864826f..5e5b6553c 100644 --- a/sparrow-py/noxfile.py +++ b/sparrow-py/noxfile.py @@ -95,7 +95,7 @@ def safety(session: Session) -> None: def mypy(session: Session) -> None: """Type-check using mypy.""" args = session.posargs or ["pysrc", "pytests", "docs/conf.py"] - session.install("mypy", "pytest") + session.install("mypy", "pytest", "pandas-stubs") install_self(session) session.run("mypy", *args) if not session.posargs: @@ -105,7 +105,7 @@ def mypy(session: Session) -> None: @session(python=python_versions) def tests(session: Session) -> None: """Run the test suite.""" - session.install("coverage[toml]", "pytest", "pygments") + session.install("coverage[toml]", "pytest", "pygments", "pandas", "pyarrow") install_self(session) try: session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) @@ -131,7 +131,7 @@ def coverage(session: Session) -> None: def typeguard(session: Session) -> None: """Runtime type checking using Typeguard.""" install_self(session) - session.install("pytest", "typeguard", "pygments") + session.install("pytest", "typeguard", "pygments", "pandas", "pyarrow") session.run("pytest", f"--typeguard-packages={package}", *session.posargs) diff --git a/sparrow-py/pyproject.toml b/sparrow-py/pyproject.toml index 69068503a..17f2ce9d8 100644 --- a/sparrow-py/pyproject.toml +++ b/sparrow-py/pyproject.toml @@ -20,6 +20,7 @@ flake8-rst-docstrings = ">=0.2.5" furo = ">=2021.11.12" isort = ">=5.10.1" mypy = ">=0.930" +pandas-stubs = "^2.0.2" pep8-naming = ">=0.12.1" pyarrow = "^12.0.1" pytest = ">=6.2.5" @@ -54,7 +55,7 @@ profile = "release" # Path to the python source directory python-source = "pysrc" # Name of the Rust module in Python -module-name = "sparrow_py.ffi" +module-name = "sparrow_py._ffi" [tool.coverage.paths] source = ["pysrc", "*/site-packages"] diff --git a/sparrow-py/pysrc/sparrow_py/__init__.py b/sparrow-py/pysrc/sparrow_py/__init__.py index e044565a8..23fa3c4c2 100644 --- a/sparrow-py/pysrc/sparrow_py/__init__.py +++ b/sparrow-py/pysrc/sparrow_py/__init__.py @@ -1,7 +1,7 @@ """Kaskada query builder and local executon engine.""" from .expr import Expr -from .expr import Literal -from .ffi import Session +from .session import Session +from .session import Table -__all__ = ["Expr", "Literal", "Session"] +__all__ = ["Expr", "Session", "Table"] diff --git a/sparrow-py/pysrc/sparrow_py/_ffi.pyi b/sparrow-py/pysrc/sparrow_py/_ffi.pyi new file mode 100644 index 000000000..a1d988a12 --- /dev/null +++ b/sparrow-py/pysrc/sparrow_py/_ffi.pyi @@ -0,0 +1,28 @@ +from typing import Optional +from typing import Sequence + +import pyarrow as pa +from sparrow_py.udf import Udf + +class Session: + def __init__(self) -> None: ... + def add_table( + self, + name: str, + time_column_name: str, + key_column_name: str, + schema: pa.Schema, + subsort_column_name: Optional[str], + grouping_name: Optional[str], + ) -> Expr: ... + +class Expr: + def __init__( + self, session: Session, operation: str, args: Sequence[Expr | int | float | str] + ) -> None: ... + def data_type(self) -> pa.DataType: ... + def data_type_string(self) -> str: ... + def equivalent(self, other: Expr) -> bool: ... + def session(self) -> Session: ... + +def call_udf(udf: Udf, result_type: pa.DataType, *args: pa.Array) -> pa.Array: ... diff --git a/sparrow-py/pysrc/sparrow_py/expr.py b/sparrow-py/pysrc/sparrow_py/expr.py index 1fdaf335e..0498cc1f3 100644 --- a/sparrow-py/pysrc/sparrow_py/expr.py +++ b/sparrow-py/pysrc/sparrow_py/expr.py @@ -2,19 +2,37 @@ import sys from typing import Callable +from typing import Sequence from typing import Tuple from typing import Union from typing import final -from sparrow_py import ffi +import pyarrow as pa +from sparrow_py import _ffi + + +Arg = Union["Expr", int, str, float] + + +def _augment_error(args: Sequence[Arg], e: Exception) -> Exception: + """Augment an error with information about the arguments.""" + if sys.version_info >= (3, 11): + # If we can add notes to the exception, indicate the types. + # This works in Python >=3.11 + for n, arg in enumerate(args): + if isinstance(arg, Expr): + e.add_note(f"Arg[{n}]: Expr of type {arg.data_type()}") + else: + e.add_note(f"Arg[{n}]: Literal {arg} ({type(arg)})") + return e class Expr(object): """A Kaskada expression.""" - ffi: ffi.Expr + _ffi: _ffi.Expr - def __init__(self, name: str, *args: "Expr") -> None: + def __init__(self, name: str, *args: Arg) -> None: """ Construct a new expression. @@ -30,36 +48,30 @@ def __init__(self, name: str, *args: "Expr") -> None: TypeError If the argument types are invalid for the given function. """ - ffi_args = [arg.ffi for arg in args] + ffi_args = [arg._ffi if isinstance(arg, Expr) else arg for arg in args] + session = next(arg._ffi.session() for arg in args if isinstance(arg, Expr)) try: - self.ffi = ffi.Expr(name, ffi_args) + self._ffi = _ffi.Expr(session=session, operation=name, args=ffi_args) except TypeError as e: - e = TypeError(str(e)) - if sys.version_info >= (3, 11): - # If we can add notes to the exception, indicate the types. - # This works in Python >=3.11 - for n, arg in enumerate(args): - e.add_note(f"Type of arg[{n}]: {arg.data_type()}") - raise e - - def __repr__(self) -> str: - """Return an unambiguous string representing the expression.""" - return repr(self.ffi) - - def __str__(self) -> str: - """Return a readable string representing the expression.""" - return str(self.ffi) - - def data_type(self) -> str: - """Return a string describing the data type.""" - return self.ffi.data_type_string() + raise _augment_error(args, TypeError(str(e))) + except ValueError as e: + raise _augment_error(args, ValueError(str(e))) + + def data_type(self) -> pa.DataType: + """Return a the data type produced by this expression.""" + return self._ffi.data_type() + + def __eq__(self, other: object) -> bool: + if not isinstance(other, Expr): + return False + return self._ffi.equivalent(other._ffi) @final def pipe( self, func: Union[Callable[..., "Expr"], Tuple[Callable[..., "Expr"], str]], - *args, - **kwargs, + *args: Arg, + **kwargs: Arg, ) -> "Expr": """ Apply chainable functions that expect expressions. @@ -136,49 +148,68 @@ def __getattr__(self, name: str) -> "Expr": Expr Expression referencing the given field. """ - return Expr("fieldref", self, Literal(name)) + # It's easy for this method to cause infinite recursion, if anything + # it references on `self` isn't defined. To try to avoid this, we only + # do most of the logic if `self` is a struct type. + self_type = self.data_type() + if isinstance(self_type, pa.StructType): + if self.data_type().get_field_index(name) != -1: + return Expr("fieldref", self, name) + else: + fields = ", ".join( + [f"'{self_type[i].name}'" for i in range(self_type.num_fields)] + ) + raise AttributeError(f"Field '{name}' not found in {fields}") + else: + raise TypeError( + f"Cannot access field '{name}' on non-struct type {self_type.id}" + ) - def __add__(self, rhs: "Expr") -> "Expr": + def __add__(self, rhs: Arg) -> "Expr": """Add two expressions.""" return Expr("add", self, rhs) - def __sub__(self, rhs: "Expr") -> "Expr": + def __radd__(self, lhs: Arg) -> "Expr": + """Add two expressions.""" + return Expr("add", lhs, self) + + def __sub__(self, rhs: Arg) -> "Expr": """Subtract two expressions.""" return Expr("sub", self, rhs) - def __mul__(self, rhs: "Expr") -> "Expr": + def __mul__(self, rhs: Arg) -> "Expr": """Multiple two expressions.""" return Expr("mul", self, rhs) - def __truediv__(self, rhs: "Expr") -> "Expr": + def __truediv__(self, rhs: Arg) -> "Expr": """Divide two expressions.""" return Expr("div", self, rhs) - def __lt__(self, rhs: "Expr") -> "Expr": + def __lt__(self, rhs: Arg) -> "Expr": """Less than comparison.""" return Expr("lt", self, rhs) - def __le__(self, rhs: "Expr") -> "Expr": + def __le__(self, rhs: Arg) -> "Expr": """Less than or equal comparison.""" return Expr("le", self, rhs) - def __gt__(self, rhs: "Expr") -> "Expr": + def __gt__(self, rhs: Arg) -> "Expr": """Greater than comparison.""" return Expr("gt", self, rhs) - def __ge__(self, rhs: "Expr") -> "Expr": + def __ge__(self, rhs: Arg) -> "Expr": """Greater than or equal comparison.""" return Expr("ge", self, rhs) - def __and__(self, rhs: "Expr") -> "Expr": + def __and__(self, rhs: Arg) -> "Expr": """Logical and.""" return Expr("and", self, rhs) - def __or__(self, rhs: "Expr") -> "Expr": + def __or__(self, rhs: Arg) -> "Expr": """Logical or.""" return Expr("or", self, rhs) - def __getitem__(self, key: Union["Expr", int, float, str]) -> "Expr": + def __getitem__(self, key: Arg) -> "Expr": """ Index into an expression. @@ -197,13 +228,12 @@ def __getitem__(self, key: Union["Expr", int, float, str]) -> "Expr": ------- Expression accessing the given index. """ - if isinstance(key, (int, float, str)): - key = Literal(key) - return Expr("index", self, key) - - -class Literal(Expr): - """A literal expression.""" - - def __init__(self, literal: Union[int, float, str]) -> None: - self.ffi = ffi.Expr("literal", [literal]) + data_type = self.data_type() + if isinstance(data_type, pa.StructType): + return Expr("fieldref", self, key) + elif isinstance(data_type, pa.MapType): + return Expr("get_map", self, key) + elif isinstance(data_type, pa.ListType): + return Expr("get_list", self, key) + else: + raise TypeError(f"Cannot index into {data_type}") diff --git a/sparrow-py/pysrc/sparrow_py/ffi.pyi b/sparrow-py/pysrc/sparrow_py/ffi.pyi deleted file mode 100644 index c0d205e0a..000000000 --- a/sparrow-py/pysrc/sparrow_py/ffi.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from typing import Sequence -from sparrow_py.udf import Udf -import pyarrow as pa - -class Session: - def __init__(self) -> None: ... - def table_names(self) -> list[str]: ... - def add_table(self, str): ... - -class Expr: - def __init__( - self, function: str, args: Sequence[Expr | int | float | str] - ) -> None: ... - def __repr__(self) -> str: ... - def __str__(self) -> str: ... - def data_type_string(self) -> str: ... - -def call_udf(udf: Udf, result_type: pa.DataType, *args: pa.Array) -> pa.Array: ... \ No newline at end of file diff --git a/sparrow-py/pysrc/sparrow_py/math.py b/sparrow-py/pysrc/sparrow_py/math.py index 0b2e448e9..7e75c834e 100644 --- a/sparrow-py/pysrc/sparrow_py/math.py +++ b/sparrow-py/pysrc/sparrow_py/math.py @@ -1,58 +1,59 @@ """Provide math functions for Kaskada queries.""" from sparrow_py import Expr +from sparrow_py.expr import Arg -def add(lhs: Expr, rhs: Expr) -> Expr: +def add(lhs: Arg, rhs: Arg) -> Expr: """Return the result of adding two expressions.""" return Expr("add", lhs, rhs) -def sub(lhs: Expr, rhs: Expr) -> Expr: +def sub(lhs: Arg, rhs: Arg) -> Expr: """Return the result of subtracting two expressions.""" return Expr("sub", lhs, rhs) -def mul(lhs: Expr, rhs: Expr) -> Expr: +def mul(lhs: Arg, rhs: Arg) -> Expr: """Return the result of multiplying two expressions.""" return Expr("mul", lhs, rhs) -def div(lhs: Expr, rhs: Expr) -> Expr: +def div(lhs: Arg, rhs: Arg) -> Expr: """Return the result of dividing two expressions.""" return Expr("div", lhs, rhs) -def lt(lhs: Expr, rhs: Expr) -> Expr: +def lt(lhs: Arg, rhs: Arg) -> Expr: """Return the result of comparing two expressions.""" return Expr("lt", lhs, rhs) -def le(lhs: Expr, rhs: Expr) -> Expr: +def le(lhs: Arg, rhs: Arg) -> Expr: """Return the result of comparing two expressions.""" return Expr("le", lhs, rhs) -def gt(lhs: Expr, rhs: Expr) -> Expr: +def gt(lhs: Arg, rhs: Arg) -> Expr: """Return the result of comparing two expressions.""" return Expr("gt", lhs, rhs) -def ge(lhs: Expr, rhs: Expr) -> Expr: +def ge(lhs: Arg, rhs: Arg) -> Expr: """Return the result of comparing two expressions.""" return Expr("ge", lhs, rhs) -def eq(lhs: Expr, rhs: Expr) -> Expr: +def eq(lhs: Arg, rhs: Arg) -> Expr: """Return the result of comparing two expressions.""" return Expr("gt", lhs, rhs) -def ne(lhs: Expr, rhs: Expr) -> Expr: +def ne(lhs: Arg, rhs: Arg) -> Expr: """Return the result of comparing two expressions.""" return Expr("ne", lhs, rhs) -def typeerror(lhs: Expr, rhs: Expr) -> Expr: +def typeerror(lhs: Arg, rhs: Arg) -> Expr: """Raise a type error.""" return Expr("typeerror", lhs, rhs) diff --git a/sparrow-py/pysrc/sparrow_py/session.py b/sparrow-py/pysrc/sparrow_py/session.py new file mode 100644 index 000000000..9d23f6703 --- /dev/null +++ b/sparrow-py/pysrc/sparrow_py/session.py @@ -0,0 +1,47 @@ +from typing import Optional +from typing import List + +import pyarrow as pa +from sparrow_py import Expr +from sparrow_py import _ffi + + +class Table(Expr): + """ "A table expression.""" + + def __init__(self, name: str, ffi: _ffi.Expr): + """Create a new table expression.""" + self.name = name + self._ffi = ffi + + +class Session(object): + """A Kaskada session.""" + + tables: List[Table] + + def __init__(self) -> None: + """Create a new session.""" + self._session = _ffi.Session() + self.tables = [] + + def add_table( + self, + name: str, + time_column_name: str, + key_column_name: str, + schema: pa.Schema, + subsort_column_name: Optional[str] = None, + grouping_name: Optional[str] = None, + ) -> Table: + ffi = self._session.add_table( + name, + time_column_name, + key_column_name, + schema, + subsort_column_name, + grouping_name, + ) + table = Table(name, ffi) + self.tables.append(table) + return table diff --git a/sparrow-py/pysrc/sparrow_py/udf.py b/sparrow-py/pysrc/sparrow_py/udf.py index f88112fbd..0058d21ae 100644 --- a/sparrow-py/pysrc/sparrow_py/udf.py +++ b/sparrow-py/pysrc/sparrow_py/udf.py @@ -1,11 +1,14 @@ import functools +from typing import Callable + import pandas as pd import pyarrow as pa -from typing import Callable + # TODO: Allow functions to return `pd.DataFrame` for struct arrays. FuncType = Callable[..., pd.Series] + class Udf(object): def __init__(self, name, func: FuncType, signature: str) -> None: functools.update_wrapper(self, func) @@ -23,11 +26,12 @@ def run_pyarrow(self, result_type: pa.DataType, *args: pa.Array) -> pa.Array: if isinstance(pd_result, pd.Series): return pa.Array.from_pandas(pd_result, type=result_type) else: - raise TypeError(f'Unsupported result type: {type(pd_result)}') + raise TypeError(f"Unsupported result type: {type(pd_result)}") def fenl_udf(name: str, signature: str): def decorator(func: FuncType): print(type(func)) return Udf(name, func, signature) - return decorator \ No newline at end of file + + return decorator diff --git a/sparrow-py/pytests/expr_test.py b/sparrow-py/pytests/expr_test.py index 23ae7531c..b06cd93c7 100644 --- a/sparrow-py/pytests/expr_test.py +++ b/sparrow-py/pytests/expr_test.py @@ -1,43 +1,102 @@ """Tests for the Kaskada query builder.""" -from sparrow_py import Literal +import sys + +import pyarrow as pa +import pytest +from sparrow_py import Session +from sparrow_py import Table from sparrow_py import math -def test_literal() -> None: - """Test conversion of Python values to literals.""" - lit1 = Literal(5) - lit2 = Literal(-5) - lit3 = Literal(5.0) - lit4 = Literal("Hello") - assert str(lit1) == "(literal 5u64)" - assert str(lit2) == "(literal -5i64)" - assert str(lit3) == "(literal 5f64)" - assert str(lit4) == '(literal "Hello")' +@pytest.fixture +def session() -> Session: + """Create a session for testing.""" + session = Session() + return session + + +@pytest.fixture +def table1(session: Session) -> Table: + """Add a table to the session for testing.""" + schema = pa.schema( + [ + ("time", pa.int32()), + ("key", pa.int64()), + ("x", pa.float64()), + ("y", pa.int32()), + ] + ) + return session.add_table("table1", "time", "key", schema) + + +def test_field_ref(session, table1) -> None: + """Test for field references.""" + field_ref_short = table1.x + assert field_ref_short.data_type() == pa.float64() + assert field_ref_short == table1.x + + field_ref_long = table1["x"] + assert field_ref_long.data_type() == pa.float64() + assert field_ref_short == field_ref_long + +def test_field_ref_no_such_field(session, table1) -> None: + """Test error when there is no such field.""" + with pytest.raises(AttributeError) as e: + # This raises a "NoSuchAttribute" error. + # We currently catch this in Python and don't do anything to + # suggest possibly alternatives. + # + # TODO: We should either surface the Sparrow error which suggests + # possible field names, or improve the Python error. + table1.foo + assert "Field 'foo' not found in 'time', 'key', 'x', 'y'" == str(e.value) -def test_expr() -> None: + +def test_field_ref_not_a_struct(session, table1) -> None: + """Test error when there the base is not a struct.""" + with pytest.raises(TypeError) as e: + table1.x.x + assert "Cannot access field 'x' on non-struct type 12" == str(e.value) + + +def test_expr(session, table1) -> None: """Test creating an expression node.""" - literal = Literal(5) - add2 = math.add(literal, literal) - assert str(add2) == "(add (literal 5u64) (literal 5u64))" + x = table1.x + assert x + 1 == x + 1 -def test_expr_field_ref() -> None: - """Test for creating field references.""" - literal = Literal(5) - field_ref = literal.foo - assert str(field_ref) == '(fieldref (literal 5u64) (literal "foo"))' +def test_expr_comparison(session, table1) -> None: + """Test basic comparisons.""" + assert (table1.x > 1) == (table1.x > 1) + # Python doesn't have a `__rgt__` (reverse gt) dunder method. + # Instead, if the LHS doesn't support `gt` with the RHS, it tries + # rhs `lt` lhs. + assert (1 < table1.x) == (table1.x > 1) -def test_expr_pipe() -> None: + +def test_expr_pipe(session, table1) -> None: """Test using `pipe` to create expressions.""" - five = Literal(5) - six = Literal(6) - five_lhs = five.pipe(math.add, six) - assert str(five_lhs) == "(add (literal 5u64) (literal 6u64))" + assert table1.x.pipe(math.add, 1) == math.add(table1.x, 1) + assert table1.x.pipe((math.add, "rhs"), 1) == math.add(1, rhs=table1.x) + + assert table1.x.pipe(math.gt, 1) == math.gt(table1.x, 1) + assert table1.x.pipe((math.gt, "rhs"), 1) == math.gt(1, rhs=table1.x) + - six_lhs = five.pipe((math.add, "rhs"), six) - assert str(six_lhs) == "(add (literal 6u64) (literal 5u64))" +def test_expr_arithmetic_types(session, table1) -> None: + """Test type inference and type errors of arithmetic expressions.""" + assert math.eq(table1.x, 1).data_type() == pa.bool_() + assert math.add(table1.x, 1).data_type() == pa.float64() + assert (table1.x + table1.y).data_type() == pa.float64() - six_lhs = five.pipe((math.add, "rhs"), lhs=six) - assert str(six_lhs) == "(add (literal 6u64) (literal 5u64))" + # TODO: This should raise a TypeError, but currently the Rust + # code always raises a ValueError, so everything comes out + # looking the same. + with pytest.raises(ValueError) as e: + math.eq(table1.x, 1) + table1.y + assert "Incompatible argument types" in str(e) + if sys.version_info >= (3, 11): + assert "Arg[0]: Expr of type bool" in e.value.__notes__ + assert "Arg[1]: Expr of type int32" in e.value.__notes__ diff --git a/sparrow-py/pytests/session_test.py b/sparrow-py/pytests/session_test.py index b99002eb0..afd4e0f94 100644 --- a/sparrow-py/pytests/session_test.py +++ b/sparrow-py/pytests/session_test.py @@ -1,16 +1,13 @@ """Tests for the Kaskada session.""" +import pyarrow as pa from sparrow_py import Session def test_session_tables() -> None: """Test list and add tables to a session.""" session = Session() - assert session.table_names() == [] + assert session.tables == [] - session.add_table("table1") - assert session.table_names() == ["table1"] - - -def test_doc() -> None: - """Test session object documentation.""" - assert Session.__doc__ == "Kaskada session object." + schema = pa.schema([("time", pa.int32()), ("key", pa.int64())]) + table = session.add_table("table1", "time", "key", schema) + assert session.tables == [table] diff --git a/sparrow-py/pytests/udf_test.py b/sparrow-py/pytests/udf_test.py index afbfd5d29..eee9ac32f 100644 --- a/sparrow-py/pytests/udf_test.py +++ b/sparrow-py/pytests/udf_test.py @@ -1,12 +1,15 @@ -from sparrow_py.udf import Udf, fenl_udf -from sparrow_py.ffi import call_udf import pandas as pd import pyarrow as pa +from sparrow_py._ffi import call_udf +from sparrow_py.udf import Udf +from sparrow_py.udf import fenl_udf + @fenl_udf("add", "add(x: number, y: number) -> number") def add(x: pd.Series, y: pd.Series) -> pd.Series: return x + y + def test_numeric_udf_pure_python() -> None: """Test the python side of UDFs.""" assert type(add) == Udf @@ -24,4 +27,4 @@ def test_numeric_udf_rust() -> None: y = pa.array([1, 13, 18, 20, 4], type=pa.int8()) result = call_udf(add, pa.int8(), x, y) print(result) - assert result == pa.array([2, 25, 35, 43, 32], type=pa.int8()) \ No newline at end of file + assert result == pa.array([2, 25, 35, 43, 32], type=pa.int8()) diff --git a/sparrow-py/src/expr.rs b/sparrow-py/src/expr.rs index 2df40d813..086be375f 100644 --- a/sparrow-py/src/expr.rs +++ b/sparrow-py/src/expr.rs @@ -1,68 +1,95 @@ -use std::sync::Arc; - +use arrow::pyarrow::ToPyArrow; use itertools::Itertools; -use pyo3::exceptions::PyTypeError; +use pyo3::exceptions::{PyRuntimeError, PyTypeError, PyValueError}; use pyo3::prelude::*; +use sparrow_compiler::query_builder::{Error, Literal, QueryBuilder}; +use sparrow_compiler::AstDfgRef; +use sparrow_syntax::FenlType; + +use crate::session::Session; + +const ENABLE_DIAGNOSTIC_PRINTS: bool = false; /// Kaskada expression node. #[derive(Clone)] #[pyclass] -pub(crate) struct Expr(Arc); - -impl std::fmt::Debug for Expr { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("Expr") - .field("kind", &self.0.kind) - .field("args", &self.0.args) - .finish() - } -} - -impl std::fmt::Display for Expr { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - if self.0.args.is_empty() { - write!(f, "({})", self.0.kind) - } else { - write!(f, "({} {})", self.0.kind, self.0.args.iter().format(" ")) - } - } -} - -pub(crate) struct ExprInfo { - kind: String, - args: Vec, - data_type: String, +pub(crate) struct Expr { + pub node: AstDfgRef, + pub session: Session, } #[pymethods] impl Expr { + /// Create a new expression. + /// + /// This creates a new expression based on the `operation` and `args` provided. #[new] - #[pyo3(signature = (kind, args))] - fn new(kind: String, args: Vec) -> PyResult { - if &kind == "typeerror" { + #[pyo3(signature = (session, operation, args))] + fn new(session: Session, operation: String, args: Vec) -> PyResult { + if &operation == "typeerror" { return Err(PyTypeError::new_err("Illegal types")); } - Ok(Self(Arc::new(ExprInfo { - kind, - args, - data_type: "some_random_type".to_owned(), - }))) + + // DO NOT SUBMIT: Error if they don't all use the same session. + let mut session_mut = session.session()?; + let args: Vec<_> = args + .into_iter() + .map(|arg| { + arg.into_ast_dfg_ref(&mut session_mut.query_builder) + // DO NOT SUBMIT: Better error handling. + .map_err(|_| PyRuntimeError::new_err("unable to create literal")) + }) + .collect::>()?; + if ENABLE_DIAGNOSTIC_PRINTS { + println!( + "{operation}({})", + args.iter() + .format_with(", ", |arg, f| f(&format_args!("{}", arg.value()))) + ); + } + let node = match session_mut.query_builder.add_expr(&operation, args) { + Ok(node) => node, + Err(e) => { + // DO NOT SUBMIT: Better error handling. + return Err(PyValueError::new_err(e.to_string())); + } + }; + std::mem::drop(session_mut); + + if ENABLE_DIAGNOSTIC_PRINTS { + println!("... {:?}", node.value()); + } + Ok(Self { node, session }) + } + + /// Return true if the two expressions are equivalent. + /// + /// Pyo3 doesn't currently support `__eq__` and we don't want to do `__richcmp__`. + /// This is mostly only used for testing, so it seems ok. + fn equivalent(&self, other: &Expr) -> PyResult { + Ok(self.node.equivalent(&other.node) && self.session == other.session) } - fn __repr__(&self) -> String { - format!("{self:?}") + /// Return the session this expression is in. + fn session(&self) -> Session { + self.session.clone() } - fn __str__(&self) -> String { - format!("{self}") + /// Return the `pyarrow` type of the resulting expression. + fn data_type(&self, py: Python) -> PyResult> { + match self.node.value_type() { + FenlType::Concrete(t) => Ok(Some(t.to_pyarrow(py)?)), + _ => Ok(None), + } } - fn data_type_string(&self) -> &str { - &self.0.data_type + /// Return the Fenl type of the expression, as a string. + fn data_type_string(&self) -> String { + self.node.value_type().to_string() } } -#[derive(FromPyObject, Debug)] +#[derive(FromPyObject)] enum Arg { Expr(Expr), LiteralUInt(u64), @@ -71,14 +98,17 @@ enum Arg { LiteralString(String), } -impl std::fmt::Display for Arg { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl Arg { + fn into_ast_dfg_ref( + self, + query_builder: &mut QueryBuilder, + ) -> error_stack::Result { match self { - Self::Expr(e) => e.fmt(f), - Self::LiteralUInt(n) => write!(f, "{n}u64"), - Self::LiteralInt(n) => write!(f, "{n}i64"), - Self::LiteralFloat(n) => write!(f, "{n}f64"), - Self::LiteralString(s) => write!(f, "{s:?}"), + Self::Expr(e) => Ok(e.node), + Self::LiteralUInt(n) => query_builder.add_literal(Literal::UInt64Literal(n)), + Self::LiteralInt(n) => query_builder.add_literal(Literal::Int64Literal(n)), + Self::LiteralFloat(n) => query_builder.add_literal(Literal::Float64Literal(n)), + Self::LiteralString(s) => query_builder.add_literal(Literal::StringLiteral(s)), } } } diff --git a/sparrow-py/src/lib.rs b/sparrow-py/src/lib.rs index 00c91428a..52a1b8bc8 100644 --- a/sparrow-py/src/lib.rs +++ b/sparrow-py/src/lib.rs @@ -8,6 +8,7 @@ mod udf; /// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to /// import the module. #[pymodule] +#[pyo3(name = "_ffi")] fn ffi(_py: Python<'_>, m: &PyModule) -> PyResult<()> { m.add_function(wrap_pyfunction!(udf::call_udf, m)?)?; m.add_class::()?; diff --git a/sparrow-py/src/session.rs b/sparrow-py/src/session.rs index afd033ccc..d64b5a4de 100644 --- a/sparrow-py/src/session.rs +++ b/sparrow-py/src/session.rs @@ -1,26 +1,74 @@ +use std::sync::{Arc, Mutex, MutexGuard}; + +use arrow::datatypes::Schema; +use arrow::pyarrow::PyArrowType; +use pyo3::exceptions::PyRuntimeError; use pyo3::prelude::*; +use sparrow_compiler::query_builder::QueryBuilder; + +use crate::expr::Expr; /// Kaskada session object. +#[derive(Clone)] #[pyclass] -pub(crate) struct Session { - tables: Vec, +pub(crate) struct Session(Arc>); + +impl PartialEq for Session { + fn eq(&self, other: &Self) -> bool { + Arc::ptr_eq(&self.0, &other.0) + } +} + +impl Eq for Session {} + +#[derive(Default)] +pub(crate) struct SessionInfo { + pub(crate) query_builder: QueryBuilder, +} + +impl Session { + pub(crate) fn session(&self) -> PyResult> { + self.0 + .lock() + .map_err(|e| pyo3::exceptions::PyRuntimeError::new_err(e.to_string())) + } } #[pymethods] impl Session { #[new] fn new() -> Self { - Self { tables: vec![] } + Self(Arc::new(Mutex::new(SessionInfo::default()))) } /// Adds a table to the session. - fn add_table(&mut self, name: &str) -> PyResult<()> { - self.tables.push(name.to_owned()); - Ok(()) - } + #[pyo3(signature = (name, time_column_name, key_column_name, schema, subsort_column_name, grouping_name))] + fn add_table( + &mut self, + name: &str, + time_column_name: &str, + key_column_name: &str, + schema: PyArrowType, + subsort_column_name: Option<&str>, + grouping_name: Option<&str>, + ) -> PyResult { + let schema = Arc::new(schema.0); + let node = self + .session()? + .query_builder + .add_table( + name, + schema, + time_column_name, + subsort_column_name, + key_column_name, + grouping_name, + ) + .map_err(|_| PyRuntimeError::new_err("failed to create table"))?; - /// Return the names of registered tables. - fn table_names(&self) -> PyResult> { - Ok(self.tables.clone()) + Ok(Expr { + node, + session: self.clone(), + }) } }