Skip to content

Commit

Permalink
WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed May 23, 2021
1 parent 2f73558 commit cfcf0a8
Show file tree
Hide file tree
Showing 95 changed files with 2,096 additions and 3,042 deletions.
9 changes: 0 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,4 @@
[workspace]
members = [
"datafusion",
"datafusion-cli",
"datafusion-examples",
"benchmarks",
"ballista/rust/client",
"ballista/rust/core",
"ballista/rust/executor",
"ballista/rust/scheduler",
]

exclude = ["python"]
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ Run a SQL query against data stored in a CSV:

```rust
use datafusion::prelude::*;
use arrow::util::pretty::print_batches;
use arrow::record_batch::RecordBatch;
use arrow2::util::pretty::print_batches;
use arrow2::record_batch::RecordBatch;

#[tokio::main]
async fn main() -> datafusion::error::Result<()> {
Expand All @@ -92,8 +92,8 @@ Use the DataFrame API to process data stored in a CSV:

```rust
use datafusion::prelude::*;
use arrow::util::pretty::print_batches;
use arrow::record_batch::RecordBatch;
use arrow2::util::pretty::print_batches;
use arrow2::record_batch::RecordBatch;

#[tokio::main]
async fn main() -> datafusion::error::Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/examples/csv_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn main() -> Result<()> {
// create local execution context
let mut ctx = ExecutionContext::new();

let testdata = datafusion::arrow::util::test_util::arrow_test_data();
let testdata = datafusion::crate::test::arrow_test_data();

// register csv file with the execution context
ctx.register_csv(
Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/examples/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn main() -> Result<()> {
// create local execution context
let mut ctx = ExecutionContext::new();

let testdata = datafusion::arrow::util::test_util::parquet_test_data();
let testdata = datafusion::crate::test::parquet_test_data();

let filename = &format!("{}/alltypes_plain.parquet", testdata);

Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/examples/flight_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use arrow_flight::{FlightDescriptor, Ticket};
/// This example is run along-side the example `flight_server`.
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let testdata = datafusion::arrow::util::test_util::parquet_test_data();
let testdata = datafusion::crate::test::parquet_test_data();

// Create Flight client
let mut client = FlightServiceClient::connect("http://localhost:50051").await?;
Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/examples/flight_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl FlightService for FlightServiceImpl {
// create local execution context
let mut ctx = ExecutionContext::new();

let testdata = datafusion::arrow::util::test_util::parquet_test_data();
let testdata = datafusion::crate::test::parquet_test_data();

// register parquet file with the execution context
ctx.register_parquet(
Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/examples/parquet_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn main() -> Result<()> {
// create local execution context
let mut ctx = ExecutionContext::new();

let testdata = datafusion::arrow::util::test_util::parquet_test_data();
let testdata = datafusion::crate::test::parquet_test_data();

// register parquet file with the execution context
ctx.register_parquet(
Expand Down
4 changes: 1 addition & 3 deletions datafusion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,14 @@ path = "src/lib.rs"

[features]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
simd = ["arrow/simd"]
crypto_expressions = ["md-5", "sha2"]
regex_expressions = ["regex", "lazy_static"]
unicode_expressions = ["unicode-segmentation"]

[dependencies]
ahash = "0.7"
hashbrown = "0.11"
arrow = { git = "https://github.com/apache/arrow-rs", rev = "4449ee96fe3fd4a0b275da8dd25ce2792699bc98", features = ["prettyprint"] }
parquet = { git = "https://github.com/apache/arrow-rs", rev = "4449ee96fe3fd4a0b275da8dd25ce2792699bc98", features = ["arrow"] }
arrow2 = { git = "https://github.com/jorgecarleitao/arrow2", rev = "4085967149a71f14589befb4e029220acb4eafe5" }
sqlparser = "0.9.0"
paste = "^1.0"
num_cpus = "1.13.0"
Expand Down
2 changes: 1 addition & 1 deletion datafusion/benches/aggregate_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use tokio::runtime::Runtime;
extern crate arrow;
extern crate datafusion;

use arrow::{
use arrow2::{
array::Float32Array,
array::Float64Array,
array::StringArray,
Expand Down
2 changes: 1 addition & 1 deletion datafusion/benches/filter_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use arrow::{
use arrow2::{
array::{Float32Array, Float64Array},
datatypes::{DataType, Field, Schema},
record_batch::RecordBatch,
Expand Down
2 changes: 1 addition & 1 deletion datafusion/benches/math_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use tokio::runtime::Runtime;
extern crate arrow;
extern crate datafusion;

use arrow::{
use arrow2::{
array::{Float32Array, Float64Array},
datatypes::{DataType, Field, Schema},
record_batch::RecordBatch,
Expand Down
7 changes: 2 additions & 5 deletions datafusion/benches/sort_limit_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ use criterion::Criterion;

use std::sync::{Arc, Mutex};

extern crate arrow;
extern crate datafusion;

use arrow::datatypes::{DataType, Field, Schema};
use arrow2::datatypes::{DataType, Field, Schema};

use datafusion::datasource::{CsvFile, CsvReadOptions, MemTable};
use datafusion::execution::context::ExecutionContext;
Expand Down Expand Up @@ -57,7 +54,7 @@ fn create_context() -> Arc<Mutex<ExecutionContext>> {
Field::new("c13", DataType::Utf8, false),
]));

let testdata = arrow::util::test_util::arrow_test_data();
let testdata = crate::test::arrow_test_data();

// create CSV data source
let csv = CsvFile::try_new(
Expand Down
Loading

0 comments on commit cfcf0a8

Please sign in to comment.