Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic FlightTableFactory with a default FlightSqlDriver #11938

Closed
wants to merge 3 commits into from
Closed
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
204 changes: 203 additions & 1 deletion datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ datafusion = { path = "../datafusion/core", version = "41.0.0", features = [
"regex_expressions",
"unicode_expressions",
"compression",
"flight",
] }
dirs = "4.0.0"
env_logger = "0.9"
Expand Down
3 changes: 3 additions & 0 deletions datafusion-cli/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use datafusion::physical_plan::{collect, execute_stream, ExecutionPlanProperties
use datafusion::sql::parser::{DFParser, Statement};
use datafusion::sql::sqlparser::dialect::dialect_from_str;

use datafusion::datasource::flight::config::FlightOptions;
use datafusion::sql::sqlparser;
use rustyline::error::ReadlineError;
use rustyline::Editor;
Expand Down Expand Up @@ -386,6 +387,8 @@ pub(crate) async fn register_object_store_and_config_extensions(
let mut table_options = ctx.session_state().default_table_options().clone();
if let Some(format) = format {
table_options.set_config_format(format);
} else {
table_options.extensions.insert(FlightOptions::default())
}
table_options.alter_with_string_hash_map(options)?;

Expand Down
7 changes: 7 additions & 0 deletions datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ default = [
"unicode_expressions",
"compression",
"parquet",
"flight",
]
encoding_expressions = ["datafusion-functions/encoding_expressions"]
# Used for testing ONLY: causes all values to hash to the same value (test for collisions)
force_hash_collisions = ["datafusion-physical-plan/force_hash_collisions", "datafusion-common/force_hash_collisions"]
flight = ["dep:arrow-flight", "dep:base64", "dep:prost", "dep:tonic"]
math_expressions = ["datafusion-functions/math_expressions"]
parquet = ["datafusion-common/parquet", "dep:parquet"]
pyarrow = ["datafusion-common/pyarrow", "parquet"]
Expand All @@ -83,6 +85,7 @@ ahash = { workspace = true }
apache-avro = { version = "0.16", optional = true }
arrow = { workspace = true }
arrow-array = { workspace = true }
arrow-flight = { workspace = true, optional = true }
arrow-ipc = { workspace = true }
arrow-schema = { workspace = true }
async-compression = { version = "0.4.0", features = [
Expand All @@ -94,6 +97,7 @@ async-compression = { version = "0.4.0", features = [
"tokio",
], optional = true }
async-trait = { workspace = true }
base64 = { version = "0.22", optional = true }
bytes = { workspace = true }
bzip2 = { version = "0.4.3", optional = true }
chrono = { workspace = true }
Expand Down Expand Up @@ -128,11 +132,13 @@ parking_lot = { workspace = true }
parquet = { workspace = true, optional = true, default-features = true }
paste = "1.0.15"
pin-project-lite = "^0.2.7"
prost = { version = "0.12", optional = true }
rand = { workspace = true }
sqlparser = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true }
tokio-util = { version = "0.7.4", features = ["io"], optional = true }
tonic = { version = "0.11", optional = true }
url = { workspace = true }
uuid = { version = "1.7", features = ["v4"] }
xz2 = { version = "0.1", optional = true, features = ["static"] }
Expand Down Expand Up @@ -161,6 +167,7 @@ test-utils = { path = "../../test-utils" }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "parking_lot", "fs"] }
tokio-postgres = "0.7.7"
tokio-stream = { version = "0.1.15", features = ["net"] }

[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
nix = { version = "0.29.0", features = ["fs"] }
Expand Down
Loading