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
2 changes: 1 addition & 1 deletion snowflake-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ polars-io = { version = ">=0.41", features = [

# put request support
glob = { version = "0.3" }
object_store = { version = "0.12", features = ["aws"] }
object_store = { version = "0.13", features = ["aws"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

[dev-dependencies]
Expand Down
5 changes: 3 additions & 2 deletions snowflake-api/src/polars.rs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not strictly related to bumping Object Store to 0.13, but was required to get things to build, because the dependency on polars >= 0.41 pulled in an API breaking change.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::convert::TryFrom;
use std::io::Cursor;
use std::num::NonZeroUsize;

use bytes::{Buf, Bytes};
use bytes::Bytes;
use polars_core::frame::DataFrame;
use polars_io::ipc::IpcStreamReader;
use polars_io::json::{JsonFormat, JsonReader};
Expand Down Expand Up @@ -76,7 +77,7 @@ fn arrays_to_objects(json_result: &JsonResult) -> Result<Value, PolarsCastError>
fn dataframe_from_bytes(bytes: Vec<Bytes>) -> Result<DataFrame, PolarsCastError> {
let mut df = DataFrame::empty();
for b in bytes {
let df_chunk = IpcStreamReader::new(b.reader()).finish()?;
let df_chunk = IpcStreamReader::new(Cursor::new(b)).finish()?;
df.vstack_mut(&df_chunk)?;
}
df.align_chunks();
Expand Down
2 changes: 1 addition & 1 deletion snowflake-api/src/put.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use futures::TryStreamExt;
use object_store::aws::AmazonS3Builder;
use object_store::limit::LimitStore;
use object_store::local::LocalFileSystem;
use object_store::ObjectStore;
use object_store::{ObjectStore, ObjectStoreExt};
use tokio::task;

use crate::responses::{AwsPutGetStageInfo, PutGetExecResponse, PutGetStageInfo};
Expand Down
Loading