Skip to content

Commit f4a4985

Browse files
committed
Update arrow 48.0.0
1 parent 7c6fdcc commit f4a4985

File tree

11 files changed

+74
-110
lines changed

11 files changed

+74
-110
lines changed

Cargo.toml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ rust-version = "1.70"
4848
version = "32.0.0"
4949

5050
[workspace.dependencies]
51-
arrow = { version = "47.0.0", features = ["prettyprint"] }
52-
arrow-array = { version = "47.0.0", default-features = false, features = ["chrono-tz"] }
53-
arrow-buffer = { version = "47.0.0", default-features = false }
54-
arrow-flight = { version = "47.0.0", features = ["flight-sql-experimental"] }
55-
arrow-schema = { version = "47.0.0", default-features = false }
56-
parquet = { version = "47.0.0", features = ["arrow", "async", "object_store"] }
51+
arrow = { version = "48.0.0", features = ["prettyprint"] }
52+
arrow-array = { version = "48.0.0", default-features = false, features = ["chrono-tz"] }
53+
arrow-buffer = { version = "48.0.0", default-features = false }
54+
arrow-flight = { version = "48.0.0", features = ["flight-sql-experimental"] }
55+
arrow-schema = { version = "48.0.0", default-features = false }
56+
parquet = { version = "48.0.0", features = ["arrow", "async", "object_store"] }
5757
sqlparser = { version = "0.38.0", features = ["visitor"] }
5858
chrono = { version = "0.4.31", default-features = false }
5959

@@ -74,3 +74,11 @@ opt-level = 3
7474
overflow-checks = false
7575
panic = 'unwind'
7676
rpath = false
77+
78+
[patch.crates-io]
79+
arrow = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
80+
arrow-array = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
81+
arrow-buffer = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
82+
arrow-flight = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
83+
arrow-schema = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
84+
parquet = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }

datafusion-cli/Cargo.lock

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

datafusion-cli/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rust-version = "1.70"
2929
readme = "README.md"
3030

3131
[dependencies]
32-
arrow = "47.0.0"
32+
arrow = "48.0.0"
3333
async-trait = "0.1.41"
3434
aws-config = "0.55"
3535
aws-credential-types = "0.55"
@@ -50,3 +50,10 @@ assert_cmd = "2.0"
5050
ctor = "0.2.0"
5151
predicates = "3.0"
5252
rstest = "0.17"
53+
54+
[patch.crates-io]
55+
arrow = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
56+
arrow-array = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
57+
arrow-buffer = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
58+
arrow-schema = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }
59+
parquet = { git = "https://github.com/tustvold/arrow-rs.git", rev = "27c795d5e4dc2351eb57f7225cd9dd051d3651c3" }

datafusion/common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ half = { version = "2.1", default-features = false }
5050
num_cpus = "1.13.0"
5151
object_store = { version = "0.7.0", default-features = false, optional = true }
5252
parquet = { workspace = true, optional = true }
53-
pyo3 = { version = "0.19.0", optional = true }
53+
pyo3 = { version = "0.20.0", optional = true }
5454
sqlparser = { workspace = true }
5555

5656
[dev-dependencies]

datafusion/common/src/file_options/csv_writer.rs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ pub struct CsvWriterOptions {
3737
/// Compression to apply after ArrowWriter serializes RecordBatches.
3838
/// This compression is applied by DataFusion not the ArrowWriter itself.
3939
pub compression: CompressionTypeVariant,
40-
/// Indicates whether WriterBuilder.has_header() is set to true.
41-
/// This is duplicative as WriterBuilder also stores this information.
42-
/// However, WriterBuilder does not allow public read access to the
43-
/// has_header parameter.
44-
pub has_header: bool,
45-
// TODO: expose a way to read has_header in arrow create
46-
// https://github.com/apache/arrow-rs/issues/4735
4740
}
4841

4942
impl CsvWriterOptions {
@@ -54,7 +47,6 @@ impl CsvWriterOptions {
5447
Self {
5548
writer_options,
5649
compression,
57-
has_header: true,
5850
}
5951
}
6052
}
@@ -65,29 +57,20 @@ impl TryFrom<(&ConfigOptions, &StatementOptions)> for CsvWriterOptions {
6557
fn try_from(value: (&ConfigOptions, &StatementOptions)) -> Result<Self> {
6658
let _configs = value.0;
6759
let statement_options = value.1;
68-
let mut has_header = true;
6960
let mut builder = WriterBuilder::default();
7061
let mut compression = CompressionTypeVariant::UNCOMPRESSED;
7162
for (option, value) in &statement_options.options {
7263
builder = match option.to_lowercase().as_str(){
7364
"header" => {
74-
has_header = value.parse()
65+
let has_header = value.parse()
7566
.map_err(|_| DataFusionError::Configuration(format!("Unable to parse {value} as bool as required for {option}!")))?;
76-
builder.has_headers(has_header)
67+
builder.with_header(has_header)
7768
},
7869
"date_format" => builder.with_date_format(value.to_owned()),
7970
"datetime_format" => builder.with_datetime_format(value.to_owned()),
8071
"timestamp_format" => builder.with_timestamp_format(value.to_owned()),
8172
"time_format" => builder.with_time_format(value.to_owned()),
82-
"rfc3339" => {
83-
let value_bool = value.parse()
84-
.map_err(|_| DataFusionError::Configuration(format!("Unable to parse {value} as bool as required for {option}!")))?;
85-
if value_bool{
86-
builder.with_rfc3339()
87-
} else{
88-
builder
89-
}
90-
},
73+
"rfc3339" => builder, // No-op
9174
"null_value" => builder.with_null(value.to_owned()),
9275
"compression" => {
9376
compression = CompressionTypeVariant::from_str(value.replace('\'', "").as_str())?;
@@ -112,7 +95,6 @@ impl TryFrom<(&ConfigOptions, &StatementOptions)> for CsvWriterOptions {
11295
}
11396
}
11497
Ok(CsvWriterOptions {
115-
has_header,
11698
writer_options: builder,
11799
compression,
118100
})

0 commit comments

Comments
 (0)