Skip to content

Commit 0c0cef3

Browse files
authored
Merge branch 'main' into sb/datafusion-math-floor
2 parents c244741 + 95de1bf commit 0c0cef3

86 files changed

Lines changed: 2581 additions & 828 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 72 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,19 @@ ahash = { version = "0.8", default-features = false, features = [
9191
"runtime-rng",
9292
] }
9393
apache-avro = { version = "0.21", default-features = false }
94-
arrow = { version = "57.3.0", features = [
94+
arrow = { version = "58.0.0", features = [
9595
"prettyprint",
9696
"chrono-tz",
9797
] }
98-
arrow-buffer = { version = "57.2.0", default-features = false }
99-
arrow-flight = { version = "57.3.0", features = [
98+
arrow-buffer = { version = "58.0.0", default-features = false }
99+
arrow-flight = { version = "58.0.0", features = [
100100
"flight-sql-experimental",
101101
] }
102-
arrow-ipc = { version = "57.2.0", default-features = false, features = [
102+
arrow-ipc = { version = "58.0.0", default-features = false, features = [
103103
"lz4",
104104
] }
105-
arrow-ord = { version = "57.2.0", default-features = false }
106-
arrow-schema = { version = "57.2.0", default-features = false }
105+
arrow-ord = { version = "58.0.0", default-features = false }
106+
arrow-schema = { version = "58.0.0", default-features = false }
107107
async-trait = "0.1.89"
108108
bigdecimal = "0.4.8"
109109
bytes = "1.11"
@@ -161,13 +161,14 @@ hex = { version = "0.4.3" }
161161
indexmap = "2.13.0"
162162
insta = { version = "1.46.3", features = ["glob", "filters"] }
163163
itertools = "0.14"
164+
itoa = "1.0"
164165
liblzma = { version = "0.4.6", features = ["static"] }
165166
log = "^0.4"
166167
memchr = "2.8.0"
167168
num-traits = { version = "0.2" }
168-
object_store = { version = "0.12.5", default-features = false }
169+
object_store = { version = "0.13.1", default-features = false }
169170
parking_lot = "0.12"
170-
parquet = { version = "57.3.0", default-features = false, features = [
171+
parquet = { version = "58.0.0", default-features = false, features = [
171172
"arrow",
172173
"async",
173174
"object_store",

datafusion-cli/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ rustyline = "17.0"
6969
tokio = { workspace = true, features = ["macros", "parking_lot", "rt", "rt-multi-thread", "signal", "sync"] }
7070
url = { workspace = true }
7171

72+
[lints]
73+
workspace = true
74+
7275
[dev-dependencies]
7376
ctor = { workspace = true }
7477
insta = { workspace = true }

datafusion-cli/src/exec.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ mod tests {
521521
use datafusion::common::plan_err;
522522

523523
use datafusion::prelude::SessionContext;
524+
use datafusion_common::assert_contains;
524525
use url::Url;
525526

526527
async fn create_external_table_test(location: &str, sql: &str) -> Result<()> {
@@ -714,25 +715,24 @@ mod tests {
714715
let err = create_external_table_test(location, &sql)
715716
.await
716717
.unwrap_err();
717-
assert!(err.to_string().contains("os error 2"));
718+
assert_contains!(err.to_string(), "os error 2");
718719

719720
// for service_account_key
720721
let sql = format!(
721722
"CREATE EXTERNAL TABLE test STORED AS PARQUET OPTIONS('gcp.service_account_key' '{service_account_key}') LOCATION '{location}'"
722723
);
723724
let err = create_external_table_test(location, &sql)
724725
.await
725-
.unwrap_err()
726-
.to_string();
727-
assert!(err.contains("No RSA key found in pem file"), "{err}");
726+
.unwrap_err();
727+
assert_contains!(err.to_string(), "Error reading pem file: no items found");
728728

729729
// for application_credentials_path
730730
let sql = format!("CREATE EXTERNAL TABLE test STORED AS PARQUET
731731
OPTIONS('gcp.application_credentials_path' '{application_credentials_path}') LOCATION '{location}'");
732732
let err = create_external_table_test(location, &sql)
733733
.await
734734
.unwrap_err();
735-
assert!(err.to_string().contains("os error 2"));
735+
assert_contains!(err.to_string(), "os error 2");
736736

737737
Ok(())
738738
}

datafusion-cli/src/functions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ impl TableProvider for ParquetMetadataTable {
233233
self
234234
}
235235

236-
fn schema(&self) -> arrow::datatypes::SchemaRef {
236+
fn schema(&self) -> SchemaRef {
237237
self.schema.clone()
238238
}
239239

@@ -482,7 +482,7 @@ impl TableProvider for MetadataCacheTable {
482482
self
483483
}
484484

485-
fn schema(&self) -> arrow::datatypes::SchemaRef {
485+
fn schema(&self) -> SchemaRef {
486486
self.schema.clone()
487487
}
488488

@@ -600,7 +600,7 @@ impl TableProvider for StatisticsCacheTable {
600600
self
601601
}
602602

603-
fn schema(&self) -> arrow::datatypes::SchemaRef {
603+
fn schema(&self) -> SchemaRef {
604604
self.schema.clone()
605605
}
606606

@@ -735,7 +735,7 @@ impl TableProvider for ListFilesCacheTable {
735735
self
736736
}
737737

738-
fn schema(&self) -> arrow::datatypes::SchemaRef {
738+
fn schema(&self) -> SchemaRef {
739739
self.schema.clone()
740740
}
741741

datafusion-cli/src/highlighter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ pub struct SyntaxHighlighter {
3838

3939
impl SyntaxHighlighter {
4040
pub fn new(dialect: &config::Dialect) -> Self {
41-
let dialect = dialect_from_str(dialect).unwrap_or(Box::new(GenericDialect {}));
41+
let dialect =
42+
dialect_from_str(dialect).unwrap_or_else(|| Box::new(GenericDialect {}));
4243
Self { dialect }
4344
}
4445
}

datafusion-cli/src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,8 @@ mod tests {
617617
| filename | file_size_bytes | metadata_size_bytes | hits | extra |
618618
+-----------------------------------+-----------------+---------------------+------+------------------+
619619
| alltypes_plain.parquet | 1851 | 8882 | 2 | page_index=false |
620-
| alltypes_tiny_pages.parquet | 454233 | 269266 | 2 | page_index=true |
621-
| lz4_raw_compressed_larger.parquet | 380836 | 1347 | 2 | page_index=false |
620+
| alltypes_tiny_pages.parquet | 454233 | 269074 | 2 | page_index=true |
621+
| lz4_raw_compressed_larger.parquet | 380836 | 1339 | 2 | page_index=false |
622622
+-----------------------------------+-----------------+---------------------+------+------------------+
623623
");
624624

@@ -648,8 +648,8 @@ mod tests {
648648
| filename | file_size_bytes | metadata_size_bytes | hits | extra |
649649
+-----------------------------------+-----------------+---------------------+------+------------------+
650650
| alltypes_plain.parquet | 1851 | 8882 | 5 | page_index=false |
651-
| alltypes_tiny_pages.parquet | 454233 | 269266 | 2 | page_index=true |
652-
| lz4_raw_compressed_larger.parquet | 380836 | 1347 | 3 | page_index=false |
651+
| alltypes_tiny_pages.parquet | 454233 | 269074 | 2 | page_index=true |
652+
| lz4_raw_compressed_larger.parquet | 380836 | 1339 | 3 | page_index=false |
653653
+-----------------------------------+-----------------+---------------------+------+------------------+
654654
");
655655

@@ -841,8 +841,8 @@ mod tests {
841841
+---------------------+-----------+-----------------+------+
842842
| metadata_size_bytes | filename | file_size_bytes | etag |
843843
+---------------------+-----------+-----------------+------+
844-
| 212 | 0.parquet | 3645 | 0 |
845-
| 212 | 1.parquet | 3645 | 1 |
844+
| 212 | 0.parquet | 3642 | 0 |
845+
| 212 | 1.parquet | 3642 | 1 |
846846
+---------------------+-----------+-----------------+------+
847847
");
848848

datafusion-cli/src/object_storage.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ pub async fn get_s3_object_store_builder(
6464
url: &Url,
6565
aws_options: &AwsOptions,
6666
resolve_region: bool,
67+
) -> Result<AmazonS3Builder> {
68+
// Box the inner future to reduce the future size of this async function,
69+
// which is deeply nested in the CLI's async call chain.
70+
Box::pin(get_s3_object_store_builder_inner(
71+
url,
72+
aws_options,
73+
resolve_region,
74+
))
75+
.await
76+
}
77+
78+
async fn get_s3_object_store_builder_inner(
79+
url: &Url,
80+
aws_options: &AwsOptions,
81+
resolve_region: bool,
6782
) -> Result<AmazonS3Builder> {
6883
let AwsOptions {
6984
access_key_id,
@@ -209,7 +224,7 @@ impl CredentialsFromConfig {
209224

210225
#[derive(Debug)]
211226
struct S3CredentialProvider {
212-
credentials: aws_credential_types::provider::SharedCredentialsProvider,
227+
credentials: SharedCredentialsProvider,
213228
}
214229

215230
#[async_trait]

0 commit comments

Comments
 (0)