Skip to content

Commit

Permalink
build: upgrade to arrow 51 (#60)
Browse files Browse the repository at this point in the history
# Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the linked Jira ticket then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
Our current version of arrow is quite old (version v45). Attempts to
update this in the past have been somewhat thwarted by dependent
projects depending on an older version of arrow and being stuck to it
due to some complicated dependency management. This is now being
resolved, and an arrow upgrade to proof-of-sql is required to resolve
it.

# What changes are included in this PR?

<!--
There is no need to duplicate the description in the ticket here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->
- arrow dependency upgraded to 51
- deprecation warnings addressed

# Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->
These changes do not affect existing functionality which is verified by
existing tests.
  • Loading branch information
tlovell-sxt authored Jul 25, 2024
1 parent 59abff3 commit 68b68b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ ark-poly = { version = "0.4.0", features = [ "parallel" ] }
ark-serialize = { version = "0.4.0" }
ark-std = { version = "0.4.0", features = [ "parallel" ] }
arrayvec = { version = "0.7" }
arrow = { version = "45.0" }
arrow-csv = { version = "45.0" }
arrow = { version = "51.0" }
arrow-csv = { version = "51.0" }
bit-iter = { version = "1.1.1" }
bigdecimal = { version = "0.4.5", features = ["serde"] }
blake3 = { version = "1.3.3" }
Expand Down
4 changes: 2 additions & 2 deletions crates/proof-of-sql/examples/posql_db/csv_accessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ pub fn read_record_batch_from_csv(
path: &Path,
) -> Result<RecordBatch, Box<dyn Error>> {
let mut csv = ReaderBuilder::new(Arc::new(schema))
.has_header(true)
.with_header(true)
.build(File::open(path)?)?;
let batch = csv.next().ok_or("Empty table.")??;
Ok(batch)
}
fn append_record_batch_to_csv(batch: &RecordBatch, path: &Path) -> Result<(), Box<dyn Error>> {
let mut writer = WriterBuilder::new()
.has_headers(false)
.with_header(false)
.build(OpenOptions::new().append(true).open(path)?);
writer.write(batch)?;
Ok(())
Expand Down

0 comments on commit 68b68b2

Please sign in to comment.