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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
[package]
authors = ["sundy-li <sundyli@apache.org>>"]
categories = ["command-line-utilities"]
description = "Replace with description"
description = "A command line tool for interacting with server in Flight SQL protocol"
documentation = "https://docs.rs/arrow_cli"
repository = "https://github.com/sundy-li/arrow_cli"
edition = "2024"
license = "Apache-2.0"
name = "arrow_cli"
version = "0.2.4"
version = "0.3.0"


[dependencies]
arrow-array = "57"
arrow-cast = { version = "57", features = ["prettyprint"] }
arrow-csv = "57"
arrow-flight = { version = "57", features = ["flight-sql-experimental"] }
arrow-schema = "57"
atty = "0.2"
rustyline = "15"
arrow-cast = { version = "55", features = ["prettyprint"] }
arrow-flight = { version = "55", features = ["flight-sql-experimental"] }
arrow = { version = "55", features = ["ipc_compression"] }
clap = { version = "4.5", features = ["derive"] }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
rustyline = "17"
tokio = { version = "1", features = [
"macros",
"rt",
"rt-multi-thread",
"sync",
"parking_lot",
] }

tonic = { version = "0.12", default-features = false, features = [
"transport",
"codegen",
"tls",
"prost",
tonic = { version = "0.14", default-features = false, features = [
"channel",
"tls-ring"
] }
clap = { version = "4.5", features = ["derive"] }
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ cargo install arrow_cli

```
> arrow_cli --help
Usage: arrow_cli <--user <USER>|--password <PASSWORD>|--host <HOST>|--port <PORT>>
Usage: arrow_cli [OPTIONS]

Options:
-u, --user <USER> User name [default: root]
-p, --password <PASSWORD> User password [default: ]
--host <HOST> Flight SQL Server host [default: 127.0.0.1]
-P, --port <PORT> Flight SQL Server port [default: 4100]
--tls
--timeout <TIMEOUT> Request timeout in seconds [default: 180]
--prepared Execute query using prepared statement
-h, --help Print help
```

## Examples
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod session;

use std::time::Duration;

use arrow::error::ArrowError;
use arrow_schema::ArrowError;
use atty::Stream;

use clap::Parser;
Expand Down
6 changes: 3 additions & 3 deletions src/session.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use arrow::csv::WriterBuilder;
use arrow::error::ArrowError;
use arrow::record_batch::RecordBatch;
use arrow_array::RecordBatch;
use arrow_cast::pretty::pretty_format_batches;
use arrow_csv::WriterBuilder;
use arrow_flight::{
flight_service_client::FlightServiceClient, sql::client::FlightSqlServiceClient,
};
use arrow_schema::ArrowError;
use futures::TryStreamExt;
use rustyline::Editor;
use rustyline::error::ReadlineError;
Expand Down